Ejemplo n.º 1
0
 def test_get_default_charset(self):
     content_type = ''
     charset = utils.get_charset(content_type)
     self.assertEqual('latin-1', charset)
Ejemplo n.º 2
0
 def test_get_charset(self):
     content_type = 'text/html; charset=utf-8'
     charset = utils.get_charset(content_type)
     self.assertEqual(charset, 'utf-8')
Ejemplo n.º 3
0
 def test_get_charset(self):
     content_type = 'text/html; charset=utf-8'
     charset = utils.get_charset(content_type)
     self.assertEqual(charset, 'utf-8')
Ejemplo n.º 4
0
 def test_get_default_charset(self):
     content_type = ''
     charset = utils.get_charset(content_type)
     self.assertEqual('latin-1', charset)
Ejemplo n.º 5
0
 def test_get_default_charset(self):
     content_type = ""
     charset = utils.get_charset(content_type)
     self.assertEqual("latin-1", charset)