Example #1
0
 def testRouteLookupFailure(self):
     request = Request.blank('')
     api = RouteApi(request, self.routemap)
     for path_args in [
         ('wot',),
         ('three', 'six'),
     ]:
         path = api.find(self.p_one.name, path_args)
         self.assertEqual(path, None)
Example #2
0
 def testRouteLookupFailure(self):
     request = Request.blank('')
     api = RouteApi(request, self.routemap)
     for path_args in [
         ('wot', ),
         ('three', 'six'),
     ]:
         path = api.find(self.p_one.name, path_args)
         self.assertEqual(path, None)
Example #3
0
 def testRouteLookup(self):
     request = Request.blank('')
     api = RouteApi(request, self.routemap)
     for path_args, path in [
         ((), '/const_one'),
         (('two', 'four'), '/two/two/four'),
         (('two', '216'), '/two/two/216/const_two'),
         (('two', 216), '/two/two/216/const_two'),
         (('two', 11), '/two/two/11'),
     ]:
         found = api.find(self.p_one.name, path_args)
         self.assertEqual(path, found)
Example #4
0
 def testRouteLookup(self):
     request = Request.blank('')
     api = RouteApi(request, self.routemap)
     for path_args, path in [
         ((), '/const_one'),
         (('two', 'four'), '/two/two/four'),
         (('two', '216'), '/two/two/216/const_two'),
         (('two', 216), '/two/two/216/const_two'),
         (('two', 11), '/two/two/11'),
     ]:
         found = api.find(self.p_one.name, path_args)
         self.assertEqual(path, found)