Skip to content

Commit

Permalink
fix: improve info view test
Browse files Browse the repository at this point in the history
  • Loading branch information
magajh committed Oct 16, 2024
1 parent 292c269 commit 1a2d15d
Showing 1 changed file with 3 additions and 8 deletions.
11 changes: 3 additions & 8 deletions eox_tenant/test/integration/test_views.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,21 +15,16 @@ 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.
Expected result:
- 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)
Expand Down

0 comments on commit 1a2d15d

Please sign in to comment.