Skip to content

Commit

Permalink
properly unload apps in views.i18n tests
Browse files Browse the repository at this point in the history
  • Loading branch information
ptone committed Aug 28, 2012
1 parent 0387a32 commit f647123
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions tests/regressiontests/views/tests/i18n.py
Expand Up @@ -103,6 +103,7 @@ def test_nonenglish_default_english_userpref(self):
with override('en-us'):
response = self.client.get('/views/jsi18n_english_translation/')
self.assertContains(response, javascript_quote('this app0 string is to be translated'))
cache.unload_app(app_label='app0')

def testI18NLanguageNonEnglishFallback(self):
"""
Expand Down Expand Up @@ -135,6 +136,8 @@ def testI18NLanguageEnglishDefault(self):
with override('fr'):
response = self.client.get('/views/jsi18n_multi_packages1/')
self.assertContains(response, javascript_quote('il faut traduire cette chaîne de caractères de app1'))
cache.unload_app(app_label='app1')
cache.unload_app(app_label='app2')

def testI18NDifferentNonEnLangs(self):
"""
Expand All @@ -148,6 +151,8 @@ def testI18NDifferentNonEnLangs(self):
with override('es-ar'):
response = self.client.get('/views/jsi18n_multi_packages2/')
self.assertContains(response, javascript_quote('este texto de app3 debe ser traducido'))
cache.unload_app(app_label='app3')
cache.unload_app(app_label='app4')

def testI18NWithLocalePaths(self):
extended_locale_paths = settings.LOCALE_PATHS + (
Expand Down

0 comments on commit f647123

Please sign in to comment.