resolve mobile login

This commit is contained in:
SowinskiBraeden committed 2026-06-29 20:24:31 -07:00
1 parent 328349d3de
commit 6b4b283679
5 files changed
+47 -6

No files matched your search

+1 -1
View File
@@ -35,7 +35,7 @@ class ProductionConfigTests(unittest.TestCase):
)
self.assertTrue(app.config["SESSION_COOKIE_SECURE"])
self.assertEqual(app.config["SESSION_COOKIE_SAMESITE"], "Strict")
self.assertEqual(app.config["SESSION_COOKIE_SAMESITE"], "Lax")
self.assertTrue(app.config["SQLALCHEMY_DATABASE_URI"].startswith("postgresql+psycopg://"))
+22
View File
@@ -42,6 +42,28 @@ class ErrorPageTests(unittest.TestCase):
self.assertNotIn(b"RuntimeError", response.data)
self.assertRegex(response.get_data(as_text=True), re.compile(r"Incident [a-f0-9]{12}"))
def test_csrf_errors_redirect_to_form_with_flash(self):
csrf_app = create_app(
{
"TESTING": True,
"PROPAGATE_EXCEPTIONS": False,
"SQLALCHEMY_DATABASE_URI": self.app.config["SQLALCHEMY_DATABASE_URI"],
"WTF_CSRF_ENABLED": True,
}
)
client = csrf_app.test_client()
response = client.post(
"/account/login",
data={"csrf_token": "stale-token", "email": "owner@example.com", "password": "password123"},
)
self.assertEqual(response.status_code, 302)
self.assertEqual(response.headers["Location"], "/account/login")
with client.session_transaction() as flask_session:
flashes = flask_session.get("_flashes", [])
self.assertIn(("error", "Your form expired. Please try again."), flashes)
if __name__ == "__main__":
unittest.main()
+4 -2
View File
@@ -34,9 +34,11 @@ class SeoTests(unittest.TestCase):
html = response.get_data(as_text=True)
self.assertEqual(response.status_code, 200)
self.assertIn("Free Home Poker Tracker, Ledger & League Leaderboards", html)
self.assertIn("Free Poker Tracker, Ledger, Stats & Profit/Loss App", html)
self.assertIn('name="description"', html)
self.assertIn("Track home poker sessions, buy-ins, cashouts, settlements", html)
self.assertIn("free poker tracker and poker ledger for home games", html)
self.assertIn("My Boker", html)
self.assertIn("poker profit or loss", html)
self.assertIn('rel="canonical" href="https://myboker.org/"', html)
self.assertIn('application/ld+json', html)