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')
def setUp(self): self.registry = ParserRegistry()