Exemplo n.º 1
0
 def test_match__shouldnt_pick_up_longer_url(self):
     e = Route("/", None, None)
     self.assertFalse(
         e.handles_route("/NB2HI4B2F4XWO33PM5WGKLTDN5WQ====", 'GET'))
Exemplo n.º 2
0
 def test_handles_route__false_if_no_match(self):
     url = "/test"
     e = Route(url, None, None)
     self.assertFalse(e.handles_route("/nottest", 'GET'))
Exemplo n.º 3
0
 def test_handles_route__false_if_different_method(self):
     url = '/test'
     e = Route(url, None, None, methods=['POST'])
     self.assertFalse(e.handles_route(url, 'GET'))
Exemplo n.º 4
0
 def test_handles_route__true_if_match(self):
     url = "/test"
     e = Route(url, None, None)
     self.assertTrue(e.handles_route(url, 'GET'))