diff --git a/tests/test_generate_form.py b/tests/test_generate_form.py index 9a705b8..95c8860 100644 --- a/tests/test_generate_form.py +++ b/tests/test_generate_form.py @@ -82,6 +82,27 @@ def _google_credential() -> str: return f"e30.{encoded}.signature" +def _mock_form_routes(page): + page.route( + "**/api/form-status/**", + lambda route: route.fulfill( + status=200, + content_type="application/json", + body='{"status":"open"}', + ), + ) + page.route( + "**/api/roster**", + lambda route: route.fulfill( + status=200, + content_type="application/json", + body=json.dumps( + {"employees": [{"name": "Ada Lovelace", "email": "ada@example.com"}]} + ), + ), + ) + + class TestGenerateFormStructural: def test_local_and_google_render(self): local = _render(google=False) @@ -140,6 +161,18 @@ class TestGenerateFormStructural: local = _render(google=False) assert "