From 1a2d15d6be0c57b49fc6751a9cbd544ec0adbee4 Mon Sep 17 00:00:00 2001 From: magajh Date: Wed, 16 Oct 2024 05:58:23 -0400 Subject: [PATCH] fix: improve info view test --- eox_tenant/test/integration/test_views.py | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/eox_tenant/test/integration/test_views.py b/eox_tenant/test/integration/test_views.py index c20a4a3b..6092c8ca 100644 --- a/eox_tenant/test/integration/test_views.py +++ b/eox_tenant/test/integration/test_views.py @@ -15,13 +15,6 @@ class TestInfoView(TestCase): Integration test suite for the info view. """ - def setUp(self) -> None: - """ - Set up the test suite. - """ - self.url = f"{settings['EOX_TENANT_BASE_URL']}{reverse('eox-info')}" - super().setUp() - def test_info_view_success(self) -> None: """Test the info view. @@ -29,7 +22,9 @@ def test_info_view_success(self) -> None: - The status code is 200. - The response contains the version, name and git commit hash. """ - response = requests.get(self.url, timeout=settings["API_TIMEOUT"]) + url = f"{settings['EOX_TENANT_BASE_URL']}{reverse('eox-info')}" + + response = requests.get(url, timeout=settings["API_TIMEOUT"]) response_data = response.json() self.assertEqual(response.status_code, status.HTTP_200_OK)