Example #1
0
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'})
Example #2
0
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"},
    )
Example #3
0
 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