def test_index_redirect_to_contacts(client): response = client.get("/") assert response.status_code == 302 assert response.headers.get("Location") == "/contacts" def test_login_get_contacts(anynomous_client): response = anynomous_client.get("/contacts", follow_redirects=False) assert response.status_code == 302 def test_get_contacts(client): response = client.get("/contacts", follow_redirects=True) assert response.status_code == 200