Пример #1
0
 def test_parent_uri_accepts_pathological_urls(self):
     # This shouldn't ever actually happen, and if it does happen
     # it's probably a sign of a larger incompatibility of this
     # method with the URL scheme
     self.assertEqual(get_parent_uri("/prague"), "")
Пример #2
0
 def test_parent_uri_behaves_sensibly_for_unknown_resources(self):
     unknown_url = "/cities/prague/monuments/castle/foods/mushrooms"
     self.assertEqual(get_parent_uri(unknown_url),
                      "/cities/prague/monuments/castle")