def test_get_default_charset(self): content_type = '' charset = utils.get_charset(content_type) self.assertEqual('latin-1', charset)
def test_get_charset(self): content_type = 'text/html; charset=utf-8' charset = utils.get_charset(content_type) self.assertEqual(charset, 'utf-8')
def test_get_default_charset(self): content_type = "" charset = utils.get_charset(content_type) self.assertEqual("latin-1", charset)