diff options
| author | Ben Sima <ben@bsima.me> | 2025-11-16 03:04:33 -0500 |
|---|---|---|
| committer | Ben Sima <ben@bsima.me> | 2025-11-16 03:04:33 -0500 |
| commit | c8c239e048c8b9b84a89cb8482a67fb6e85fb724 (patch) | |
| tree | 6210621fc26ca9cb2c0c77f821b6639996411181 /Biz/PodcastItLater | |
| parent | 11d699f6159b9b2f130a625ce7667fd1ad85fd88 (diff) | |
Fix pre-existing test failures in Web.py
- test_session_persistence: Check for navbar links instead of removed
'Logged in as:' text - test_delete_action: Add referer header to
trigger HX-Redirect response
Diffstat (limited to 'Biz/PodcastItLater')
| -rw-r--r-- | Biz/PodcastItLater/Web.py | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/Biz/PodcastItLater/Web.py b/Biz/PodcastItLater/Web.py index 767ab84..2868147 100644 --- a/Biz/PodcastItLater/Web.py +++ b/Biz/PodcastItLater/Web.py @@ -1713,9 +1713,9 @@ class TestAuthentication(BaseWebTest): # Access protected page response = self.client.get("/") - # Should see logged-in content - self.assertIn("Logged in as:", response.text) - self.assertIn("test@example.com", response.text) + # Should see logged-in content (navbar with Manage Account link) + self.assertIn("Manage Account", response.text) + self.assertIn("Home", response.text) def test_protected_routes_pending_user(self) -> None: """Pending users should not access protected routes.""" @@ -1982,7 +1982,10 @@ class TestAdminInterface(BaseWebTest): def test_delete_action(self) -> None: """Test delete button functionality.""" - response = self.client.delete(f"/queue/{self.job_id}") + response = self.client.delete( + f"/queue/{self.job_id}", + headers={"referer": "/admin"}, + ) self.assertEqual(response.status_code, 200) self.assertIn("HX-Redirect", response.headers) |
