示例#1
0
 def test_disable_i18n(self):
     self.app.config['locales'] = []
     locale = i18n.set_locale(self)
     self.assertEqual(locale, None)
     self.app.config['locales'] = None 
     locale = i18n.set_locale(self)
     self.assertEqual(locale, None)
示例#2
0
 def test_disable_i18n(self):
     self.app.config['locales'] = []
     locale = i18n.set_locale(self)
     self.assertEqual(locale, None)
     self.app.config['locales'] = None
     locale = i18n.set_locale(self)
     self.assertEqual(locale, None)
示例#3
0
 def __init__(self, request, response):
     """ Override the initialiser in order to set the language.
     """
     self.initialize(request, response)
     self.locale = i18n.set_locale(self)
     self.view = ViewClass()
示例#4
0
 def __init__(self, request, response):
     """ Override the initialiser in order to set the language.
     """
     self.initialize(request, response)
     self.locale = i18n.set_locale(self)
     self.view = ViewClass()