Ejemplo n.º 1
0
 def test_router_routes_to_known_route(self):
     matching_router = Mock()
     r = Router([matching_router])
     r.match(r, 'test')
     matching_router.handle.assert_called_with(r)
Ejemplo n.º 2
0
 def test_router_returns_none_on_no_match(self):
     r = Router([])
     self.assertIsNone(r.match(r, 'test'))