Beispiel #1
0
 def test_match__returns_dict_on_angle_match(self):
     url = "/<works>"
     e = Route(url, None, None)
     matches = e._match("/oh_yea")
     self.assertIsInstance(matches, dict)
     self.assertIn('works', matches)
     self.assertEqual(matches['works'], 'oh_yea')
Beispiel #2
0
    def test_match__returns_none_on_no_match(self):
        url = "/<test>"
        e = Route(url, None, None)

        self.assertEqual(e._match("nope"), None)
Beispiel #3
0
 def test_match__returns_dict_on_raw_match(self):
     url = "/works"
     e = Route(url, None, None)
     self.assertIsInstance(e._match("/works"), dict)