Skip to content

Commit

Permalink
Not working
Browse files Browse the repository at this point in the history
  • Loading branch information
why-not-try-calmer committed Apr 4, 2023
1 parent 1b6473f commit 4787673
Showing 1 changed file with 16 additions and 11 deletions.
27 changes: 16 additions & 11 deletions conformance-tests/ogcf.py
Original file line number Diff line number Diff line change
Expand Up @@ -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}")
Expand All @@ -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__":
Expand Down

0 comments on commit 4787673

Please sign in to comment.