Exemple #1
0
    def test_given_wrong_content_type_then_raises_error(self):
        registry = ParserRegistry()
        registry.register('application/json', Mock())

        self.assertRaises(ContentTypeError,
                          self.registry.parser_for_content_type,
                          'content/type')
Exemple #2
0
 def setUp(self):
     self.registry = ParserRegistry()