diff --git a/conformance-tests/ogcf.py b/conformance-tests/ogcf.py index b13be7cd..446984ea 100644 --- a/conformance-tests/ogcf.py +++ b/conformance-tests/ogcf.py @@ -13,10 +13,14 @@ class ConformanceTest(unittest.TestCase): def setUpClass(cls): app_address = "django:8000" cls.api_url = f"http://{app_address}/oapif/" - - conformance_suite_address = "conformance_suite:8081" - cls.conformance_suites_url = f"http://{conformance_suite_address}/teamengine/rest/suites" - cls.conformance_ogc_suite_url = f"{cls.conformance_suites_url}/ogcapi-features-1.0/run" + + conformance_suite_address = "conformance_suite:8080" + cls.conformance_suites_url = ( + f"http://{conformance_suite_address}/teamengine/rest/suites" + ) + cls.conformance_ogc_suite_url = ( + f"{cls.conformance_suites_url}/ogcapi-features-1.0/run" + ) def test_endpoint_django(self): print(f"Trying to access: {self.api_url}") @@ -26,15 +30,16 @@ def test_endpoint_django(self): def test_endpoint_testsuite(self): print(f"Trying to access: {self.conformance_suites_url}") response = requests.get(self.conformance_suites_url) + print(response.text, response.status_code) self.assertTrue(is_200(response)) - # def test_conformance_api(self): - # params = {"iut": self.api_url} - # encoded_params = urlencode(params, quote_via=quote_plus) - # url = f"{self.test_client_url}?{encoded_params}" - # headers = {"Accept": "application/xml"} - # response = requests.get(url, headers=headers) - # self.assertTrue(is_200(response)) + def test_conformance_api(self): + params = {"iut": self.api_url} + encoded_params = urlencode(params, quote_via=quote_plus) + url = f"{self.test_client_url}?{encoded_params}" + headers = {"Accept": "application/xml"} + response = requests.get(url, headers=headers) + self.assertTrue(is_200(response)) if __name__ == "__main__":