Beispiel #1
0
 def test_from_handler__not_callable(self):
     with pytest.raises(TypeError):
         View.from_handler(1)
Beispiel #2
0
 async def test_interface_get(self, *, app, web):
     view = View(app, web)
     with pytest.raises(MethodNotAllowed):
         await view.get(Mock(name='request', autospec=Request))
Beispiel #3
0
 async def test_interface_get(self, app, web):
     view = View(app, web)
     assert await view.get(
         Mock(name='request', autospec=Request)) is None