Ticket #8752: auth_tests.diff

File auth_tests.diff, 1.5 KB (added by Koen Biermans <koen.biermans@…>, 16 years ago)
  • django/contrib/auth/tests/views.py

     
    1111    fixtures = ['authtestdata.json']
    1212    urls = 'django.contrib.auth.urls'
    1313
     14    def setUp(self):
     15        self.old_LANGUAGES = settings.LANGUAGES
     16        self.old_LANGUAGE_CODE = settings.LANGUAGE_CODE
     17        settings.LANGUAGES = (('en', 'English'),)
     18        settings.LANGUAGE_CODE = 'en'
     19
     20    def tearDown(self):
     21        settings.LANGUAGES = self.old_LANGUAGES
     22        settings.LANGUAGE_CODE = self.old_LANGUAGE_CODE
     23
    1424    def test_email_not_found(self):
    1525        "Error is raised if the provided email address isn't currently registered"
    1626        response = self.client.get('/password_reset/')
     
    95105    urls = 'django.contrib.auth.urls'
    96106
    97107    def setUp(self):
     108        self.old_LANGUAGES = settings.LANGUAGES
     109        self.old_LANGUAGE_CODE = settings.LANGUAGE_CODE
     110        settings.LANGUAGES = (('en', 'English'),)
     111        settings.LANGUAGE_CODE = 'en'
    98112        self.old_TEMPLATE_DIRS = settings.TEMPLATE_DIRS
    99113        settings.TEMPLATE_DIRS = (
    100114            os.path.join(
     
    104118        ,)
    105119
    106120    def tearDown(self):
     121        settings.LANGUAGES = self.old_LANGUAGES
     122        settings.LANGUAGE_CODE = self.old_LANGUAGE_CODE
    107123        settings.TEMPLATE_DIRS = self.old_TEMPLATE_DIRS
    108124
    109125    def login(self, password='password'):
Back to Top