diff --git a/lib/python/dbrepo/RestClient.py b/lib/python/dbrepo/RestClient.py index 4ec7569929257e755ccdf099c1a9b319e844382f..31c83fa55ef35ae76ca7d45e6ab0a0de0d094aac 100644 --- a/lib/python/dbrepo/RestClient.py +++ b/lib/python/dbrepo/RestClient.py @@ -36,7 +36,7 @@ class RestClient: secure: bool = None def __init__(self, - endpoint: str = 'http://gateway-service', + endpoint: str = 'http://localhost', username: str = None, password: str = None, secure: bool = True) -> None: diff --git a/lib/python/tests/test_system_license.py b/lib/python/tests/test_system_license.py new file mode 100644 index 0000000000000000000000000000000000000000..0d2f372ec8efa861a79ecde7208922ad3de1dea8 --- /dev/null +++ b/lib/python/tests/test_system_license.py @@ -0,0 +1,21 @@ +import unittest + +from dbrepo.RestClient import RestClient + +from dbrepo.api.dto import License + + +class LicenseSystemTest(unittest.TestCase): + + def test_get_licenses_succeeds(self): + exp = [License(identifier='CC-BY-4.0', uri='https://creativecommons.org/licenses/by/4.0/legalcode', + description='The Creative Commons Attribution license allows re-distribution and re-use of a licensed work on the condition that the creator is appropriately credited.'), + License(identifier='CC0-1.0', uri='https://creativecommons.org/publicdomain/zero/1.0/legalcode', + description='CC0 waives copyright interest in a work you\'ve created and dedicates it to the world-wide public domain. Use CC0 to opt out of copyright entirely and ensure your work has the widest reach.')] + # test + response = RestClient().get_licenses() + self.assertEqual(exp, response) + + +if __name__ == "__main__": + unittest.main() diff --git a/lib/python/tests/test_unit_container.py b/lib/python/tests/test_unit_container.py index b7a35e6a4a714f38d3cb06841541b182a0c769e2..ba5236e49a98d3c25e1e3bde288f10948a019481 100644 --- a/lib/python/tests/test_unit_container.py +++ b/lib/python/tests/test_unit_container.py @@ -55,8 +55,12 @@ class ContainerUnitTest(unittest.TestCase): running=True, host="data-db", port=12345, +<<<<<<< Updated upstream sidecar_host="data-db-sidecar", sidecar_port=3305, +======= + created=datetime.datetime(2024, 3, 26, 10, 11, 0, 0, datetime.timezone.utc), +>>>>>>> Stashed changes image=Image(id=1, registry="docker.io", name="mariadb", diff --git a/lib/python/tests/test_unit_license.py b/lib/python/tests/test_unit_license.py index 7f2a52890e6e48c9cfc5c8d173e763f105da275a..f64ed76d31e3fd797e96add601d9f690beb23d14 100644 --- a/lib/python/tests/test_unit_license.py +++ b/lib/python/tests/test_unit_license.py @@ -7,7 +7,7 @@ from dbrepo.RestClient import RestClient from dbrepo.api.dto import License -class DatabaseUnitTest(unittest.TestCase): +class LicenseUnitTest(unittest.TestCase): def test_get_licenses_empty_succeeds(self): with requests_mock.Mocker() as mock: