added language testing for en (besides en-us)
This commit is contained in:
parent
1cb419f73f
commit
22e33327fc
|
@ -17,13 +17,10 @@ class LoginTestCase(TestCase):
|
||||||
|
|
||||||
def testLogin(self):
|
def testLogin(self):
|
||||||
self.assertContains(self.response, 'Du bist eingeloggt als vladimir@reiherzehe.com', status_code=200)
|
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')
|
response_en = self.client.get('/', HTTP_ACCEPT_LANGUAGE='en-us')
|
||||||
#self.response_en = self.client.get('/')
|
self.assertContains(response_en, 'You are logged in as vladimir@reiherzehe.com', status_code=200)
|
||||||
print('START')
|
self.assertContains(response_en, 'Firstname', status_code=200)
|
||||||
print (response_en.content)
|
response_en = self.client.get('/', HTTP_ACCEPT_LANGUAGE='en')
|
||||||
print('END')
|
|
||||||
self.assertContains(response_en, 'You are logged in as vladimir@reiherzehe.com', status_code=200)
|
self.assertContains(response_en, 'You are logged in as vladimir@reiherzehe.com', status_code=200)
|
||||||
self.assertContains(response_en, 'Firstname', status_code=200)
|
self.assertContains(response_en, 'Firstname', status_code=200)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue