added language testing for en (besides en-us)

This commit is contained in:
Benni Bärmann 2022-01-27 13:26:54 +01:00
parent 1cb419f73f
commit 22e33327fc
1 changed files with 3 additions and 6 deletions

View File

@ -17,13 +17,10 @@ class LoginTestCase(TestCase):
def testLogin(self):
self.assertContains(self.response, 'Du bist eingeloggt als vladimir@reiherzehe.com', status_code=200)
# self.client.cookies.load({settings.LANGUAGE_COOKIE_NAME: 'en'})
#with translation.override('en'):
response_en = self.client.get('/', HTTP_ACCEPT_LANGUAGE='en-us')
#self.response_en = self.client.get('/')
print('START')
print (response_en.content)
print('END')
self.assertContains(response_en, 'You are logged in as vladimir@reiherzehe.com', status_code=200)
self.assertContains(response_en, 'Firstname', status_code=200)
response_en = self.client.get('/', HTTP_ACCEPT_LANGUAGE='en')
self.assertContains(response_en, 'You are logged in as vladimir@reiherzehe.com', status_code=200)
self.assertContains(response_en, 'Firstname', status_code=200)