Пример #1
0
 def test_activate_deactivate(self):
     """Should activate and deactivate languages"""
     self.assertEqual(translation.get_language(), settings.LANGUAGE_CODE)
     translation.activate('de')
     self.assertEqual(translation.get_language(), 'de')
     self.assertNotEqual(translation.get_language(), settings.LANGUAGE_CODE)
     translation.deactivate()
     self.assertEqual(translation.get_language(), settings.LANGUAGE_CODE)
Пример #2
0
 def setUp(self):
     translation.deactivate()