Пример #1
0
class TestNotFoundRouter(TestHTTPRouter):
    """Collection of tests to ensure the NotFoundRouter object works as expected"""
    route = NotFoundRouter(output='output',
                           versions=(1, ),
                           parse_body=False,
                           transform='transform',
                           requires=('love', ),
                           parameters=('one', ),
                           defaults={'one': 'value'})
Пример #2
0
class TestNotFoundRouter(TestHTTPRouter):
    """Collection of tests to ensure the NotFoundRouter object works as expected"""

    route = NotFoundRouter(
        output="output",
        versions=(1,),
        parse_body=False,
        transform="transform",
        requires=("love",),
        parameters=("one",),
        defaults={"one": "value"},
    )
Пример #3
0
 def test_not_found(self):
     """Test to ensure you can dynamically create a Not Found route attached to a hug API"""
     assert self.router.not_found().route == NotFoundRouter(api=api).route