Skip to content

Commit

Permalink
inttest try 2
Browse files Browse the repository at this point in the history
  • Loading branch information
AvangardAA committed Oct 27, 2023
1 parent 40f54d7 commit bccc46c
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions tests/e2e/e2e_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,12 +82,12 @@ async def test_get_reports_200(self):
except json.JSONDecodeError:
self.fail("Response is not valid JSON")

"""async def test_get_reports_V2_200(self):
async def test_get_reports_V2_200(self):
async with httpx.AsyncClient() as client:
async with httpx.AsyncClient() as client:

response = await client.get(
"http://127.0.0.1:8000/api/report?report_name=dummy1&ffrom=2023-19-10-07:00&to=2023-23-10-07:00&ver=2")
"http://127.0.0.1:8000/api/report?report_name=dummy&ffrom=2023-19-10-07:00&to=2023-23-10-07:00&ver=2")

if response.status_code == 307:
location = response.headers.get("Location")
Expand All @@ -100,19 +100,19 @@ async def test_get_reports_200(self):
else:
try:
parsed_data = json.loads(data)
self.assertIsInstance(parsed_data, dict)
self.assertTrue(len(parsed_data) == 1)
self.assertIsInstance(parsed_data, list)
self.assertTrue(len(parsed_data) == 2)
except json.JSONDecodeError:
self.fail("Response is not valid JSON")"""
self.fail("Response is not valid JSON")

def test_start_get200_fail(self):
asyncio.run(self.test_get_reports_307_then_200_then_fail())

def test_start_get200(self):
asyncio.run(self.test_get_reports_200())

"""def test_start_get200V2(self):
asyncio.run(self.test_get_reports_V2_200())"""
def test_start_get200V2(self):
asyncio.run(self.test_get_reports_V2_200())

if __name__ == '__main__':
unittest.main()

0 comments on commit bccc46c

Please sign in to comment.