Exemplo n.º 1
0
 def test_get_encodings(self):
     # reload locales modules before and after to defeat memoization of
     # get_encodings()
     reload_module(locales)
     with patch('sys.getdefaultencoding', return_value='xyzzy'):
         encodings = locales.get_encodings()
         for enc in (__salt_system_encoding__, 'xyzzy', 'utf-8', 'latin-1'):
             self.assertIn(enc, encodings)
     reload_module(locales)
Exemplo n.º 2
0
 def test_get_encodings(self):
     # reload locales modules before and after to defeat memoization of
     # get_encodings()
     reload_module(locales)
     with patch('sys.getdefaultencoding', return_value='xyzzy'):
         encodings = locales.get_encodings()
         for enc in (__salt_system_encoding__, 'xyzzy', 'utf-8', 'latin-1'):
             self.assertIn(enc, encodings)
     reload_module(locales)
Exemplo n.º 3
0
 def test_get_encodings(self):
     # reload locales modules before and after to defeat memoization of
     # get_encodings()
     reload_module(locales)
     with patch("sys.getdefaultencoding", return_value="xyzzy"):
         encodings = locales.get_encodings()
         for enc in (__salt_system_encoding__, "xyzzy", "utf-8", "latin-1"):
             self.assertIn(enc, encodings)
     reload_module(locales)