(test_client_factory: TestClientFactory)
| 210 | |
| 211 | |
| 212 | def test_user_interface(test_client_factory: TestClientFactory) -> None: |
| 213 | with test_client_factory(app) as client: |
| 214 | response = client.get("/") |
| 215 | assert response.status_code == 200 |
| 216 | assert response.json() == {"authenticated": False, "user": ""} |
| 217 | |
| 218 | response = client.get("/", auth=("tomchristie", "example")) |
| 219 | assert response.status_code == 200 |
| 220 | assert response.json() == {"authenticated": True, "user": "tomchristie"} |
| 221 | |
| 222 | |
| 223 | def test_authentication_required(test_client_factory: TestClientFactory) -> None: |
nothing calls this directly
no test coverage detected