Add activity push notifications and registration patches

This commit is contained in:
2026-09-15 08:31:45 +02:00
parent 7c801dfddd
commit 55174684af
38 changed files with 1096 additions and 42 deletions
+3 -2
View File
@@ -69,7 +69,7 @@ class TranslationTests(unittest.TestCase):
for path, title in [('/datenschutz', 'Privacy policy'), ('/impressum', 'Legal notice')]:
page = client.get(path)
self.assertIn(title, page.text)
self.assertIn('aria-label="English" aria-current="true"', page.text)
self.assertIn('aria-label="Switch to German"', page.text)
response = client.get('/language/de?next=/login')
self.assertIn('Anmelden', response.text)
self.assertIn('<html lang="de">', response.text)
@@ -136,7 +136,8 @@ class TranslationTests(unittest.TestCase):
with self.assertRaisesRegex(ValueError, 'Instagram') as error:
main.normalize_instagram_url('https://evil.example/test')
self.assertIn('Please enter', str(error.exception))
response = main.change_language('invalid')
from starlette.requests import Request
response = main.change_language(Request({'type': 'http', 'headers': []}), 'invalid')
self.assertEqual(response.body, b'Invalid language.')