From 22e33327fc43b383095df8e4e35414c47c3b91db Mon Sep 17 00:00:00 2001 From: Benni Baermann Date: Thu, 27 Jan 2022 13:26:54 +0100 Subject: [PATCH] added language testing for en (besides en-us) --- evapp/tests.py | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/evapp/tests.py b/evapp/tests.py index 3e7109f..e3ee0de 100644 --- a/evapp/tests.py +++ b/evapp/tests.py @@ -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)