Add activity push notifications and registration patches
This commit is contained in:
@@ -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.')
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user