Пример #1
0
 def test_parse_mimetype_2(self):
     self.assertEqual(helpers.parse_mimetype('*'), ('*', '*', '', {}))
Пример #2
0
 def test_parse_mimetype_8(self):
     self.assertEqual(helpers.parse_mimetype('text/plain;base64'),
                      ('text', 'plain', '', {
                          'base64': ''
                      }))
Пример #3
0
 def test_parse_mimetype_7(self):
     self.assertEqual(helpers.parse_mimetype('application/rss+xml'),
                      ('application', 'rss', 'xml', {}))
Пример #4
0
 def test_parse_mimetype_6(self):
     self.assertEqual(
         helpers.parse_mimetype('ApPlIcAtIoN/JSON;ChaRseT="UTF-8"'),
         ('application', 'json', '', {
             'charset': 'UTF-8'
         }))
Пример #5
0
 def test_parse_mimetype_5(self):
     self.assertEqual(
         helpers.parse_mimetype('''application/json; charset=utf-8;'''),
         ('application', 'json', '', {
             'charset': 'utf-8'
         }))
Пример #6
0
 def test_parse_mimetype_3(self):
     self.assertEqual(helpers.parse_mimetype('application/json'),
                      ('application', 'json', '', {}))