def test_FORM_ENCODED(self):        
     self.assertEquals(
         _get_deserializer('application/X-WWW-FORM-URLENCODED'),
         _form_encoded_data_deserializer,
     )                
 def test_json_utf8(self):        
     self.assertEquals(
         _get_deserializer('application/json; charset=utf-8'),
         _json_deserializer,
     )
 def test_form_encoded(self):        
     self.assertEquals(
         _get_deserializer('application/x-www-form-urlencoded'),
         _form_encoded_data_deserializer,
     )                
 def test_json(self):        
     self.assertEquals(
         _get_deserializer('application/json'),
         _json_deserializer,
     )
 def test_JSON(self):        
     self.assertEquals(
         _get_deserializer('Application/JSON'),
         _json_deserializer,
     )
 def test_empty(self):
     self.assertIsNone(_get_deserializer(''))
 def test_unsupported(self):        
     self.assertIsNone(_get_deserializer('unsupported media type'))
Пример #8
0
 def test_form_encoded(self):
     self.assertEquals(
         _get_deserializer('application/x-www-form-urlencoded'),
         _form_encoded_data_deserializer,
     )
Пример #9
0
 def test_FORM_ENCODED(self):
     self.assertEquals(
         _get_deserializer('application/X-WWW-FORM-URLENCODED'),
         _form_encoded_data_deserializer,
     )
Пример #10
0
 def test_json_utf8(self):
     self.assertEquals(
         _get_deserializer('application/json; charset=utf-8'),
         _json_deserializer,
     )
Пример #11
0
 def test_JSON(self):
     self.assertEquals(
         _get_deserializer('Application/JSON'),
         _json_deserializer,
     )
Пример #12
0
 def test_json(self):
     self.assertEquals(
         _get_deserializer('application/json'),
         _json_deserializer,
     )
Пример #13
0
 def test_unsupported(self):
     self.assertIsNone(_get_deserializer('unsupported media type'))
Пример #14
0
 def test_empty(self):
     self.assertIsNone(_get_deserializer(''))