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