class TestExceptionRouter(TestHTTPRouter): """Collection of tests to ensure the ExceptionRouter object works as expected""" route = ExceptionRouter(Exception, output='output', versions=(1, ), parse_body=False, transform='transform', requires=('love', ), parameters=('one', ), defaults={'one': 'value'})
class TestExceptionRouter(TestHTTPRouter): """Collection of tests to ensure the ExceptionRouter object works as expected""" route = ExceptionRouter( Exception, output="output", versions=(1,), parse_body=False, transform="transform", requires=("love",), parameters=("one",), defaults={"one": "value"}, )
def test_exception(self): """Test to ensure you can dynamically create an Exception route attached to a hug API""" assert self.router.exception().route == ExceptionRouter(api=api).route