diff --git a/ontologytimemachine/custom_proxy.py b/ontologytimemachine/custom_proxy.py index afbb789..bb13590 100644 --- a/ontologytimemachine/custom_proxy.py +++ b/ontologytimemachine/custom_proxy.py @@ -27,8 +27,8 @@ default_cfg: Config = Config() config = None -IP = default_cfg.port -PORT = default_cfg.host +IP = default_cfg.host +PORT = default_cfg.port class OntologyTimeMachinePlugin(HttpProxyBasePlugin): diff --git a/tests/test_integration.py b/tests/test_integration.py index 35169ef..26150d0 100644 --- a/tests/test_integration.py +++ b/tests/test_integration.py @@ -4,14 +4,9 @@ import time import subprocess import itertools -from ontologytimemachine.utils.config import Config +from ontologytimemachine.custom_proxy import IP, PORT -default_cfg: Config = Config() - -IP = default_cfg.port -PORT = default_cfg.host - PROXY = f"{IP}:{PORT}" HTTP_PROXY = f"http://{PROXY}" HTTPS_PROXY = f"http://{PROXY}" @@ -116,14 +111,24 @@ def test_15_linked_web_apis(): def generic_test(iri, content_type): - response = requests.get(iri, proxies=PROXIES, verify=CA_CERT_PATH) + response = requests.get( + iri, + proxies=PROXIES, + verify=CA_CERT_PATH, + auth=HTTPBasicAuth("admin", "archivo"), + ) assert response.status_code == 200 assert iri in response.content.decode("utf-8") def iri_generic_test(iri): try: - response = requests.get(iri, proxies=PROXIES, verify=CA_CERT_PATH) + response = requests.get( + iri, + proxies=PROXIES, + verify=CA_CERT_PATH, + auth=HTTPBasicAuth("admin", "archivo"), + ) assert response.status_code == 200 assert iri in response.content.decode("utf-8") except AssertionError: