Exemplo n.º 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)
Exemplo n.º 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)
Exemplo n.º 3
0
 def test_disable_i18n(self):
     mock_http_client = Mock()
     http_requests = HttpRequests(mock_http_client)
     self.app.config['locales'] = []
     locale = i18n.set_locale(self, http_requests)
     self.assertEqual(locale, None)
     self.app.config['locales'] = None
     locale = i18n.set_locale(self, http_requests)
     self.assertEqual(locale, None)
Exemplo n.º 4
0
 def __init__(self, request, response):
     """ Override the initialiser in order to set the language.
     """
     logging.info("Base Handler b")
     self.initialize(request, response)
     self.locale = i18n.set_locale(self, request)
     self.view = ViewClass()
Exemplo n.º 5
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, request)
     self.view = ViewClass()
Exemplo n.º 6
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()