Closed JamesCHub closed 1 year ago
chapter9_app_external_api_test.py in this code repo has the fixtures, but is missing the actual test function
From the book:
@pytest.mark.asyncio async def test_get_employees(test_client: httpx.AsyncClient): response = await test_client.get("/employees") assert response.status_code == status.HTTP_200_OK json = response.json() assert json == MockExternalAPI.mock_data return response.json()
If you try to test the code as is you get a "no tests ran" message. Have to add the test function (above) to the test.py
Hi @JamesCHub 👋
You're right! The code shown in the book is actually correct. I've fixed the code examples! Thank you for your vigilance 👍
chapter9_app_external_api_test.py in this code repo has the fixtures, but is missing the actual test function
From the book:
If you try to test the code as is you get a "no tests ran" message. Have to add the test function (above) to the test.py