Пример #1
0
 def test_root_on_root(self):
     """ root_url pessimistic on root
     """
     root_url = "root/"
     path = "/"
     expected = "/root"
     rooted_url = rooted_path(root_url, path)
     self.assertEqual(expected, rooted_url)
Пример #2
0
 def test_root_url_with_slash_in_front(self):
     """ Happy scenario too, root_url with slash in front
     """
     root_url = "/root"
     path = "/ext"
     expected = "/root/ext"
     rooted_url = rooted_path(root_url, path)
     self.assertEqual(expected, rooted_url)
Пример #3
0
 def test_root_url_no_slash(self):
     """ root_url with no slash
     """
     root_url = "root"
     path = "/ext"
     expected = "/root/ext"
     rooted_url = rooted_path(root_url, path)
     self.assertEqual(expected, rooted_url)
Пример #4
0
 def test_root_url_with_slash_in_front_and_back(self):
     """ Happy scenario, root_url with slash back to back
     """
     root_url = "/root/"
     path = "/ext"
     expected = "/root/ext"
     rooted_url = rooted_path(root_url, path)
     self.assertEqual(expected, rooted_url)
Пример #5
0
 def test_root_on_root(self):
     """ root_url pessimistic on root
     """
     root_url = "root/"
     path = "/"
     expected = "/root"
     rooted_url = rooted_path(root_url, path)
     self.assertEqual(expected, rooted_url)
Пример #6
0
 def test_root_url_no_slash(self):
     """ root_url with no slash
     """
     root_url = "root"
     path = "/ext"
     expected = "/root/ext"
     rooted_url = rooted_path(root_url, path)
     self.assertEqual(expected, rooted_url)
Пример #7
0
 def test_root_url_with_slash_in_front(self):
     """ Happy scenario too, root_url with slash in front
     """
     root_url = "/root"
     path = "/ext"
     expected = "/root/ext"
     rooted_url = rooted_path(root_url, path)
     self.assertEqual(expected, rooted_url)
Пример #8
0
 def test_root_url_with_slash_in_front_and_back(self):
     """ Happy scenario, root_url with slash back to back
     """
     root_url = "/root/"
     path = "/ext"
     expected = "/root/ext"
     rooted_url = rooted_path(root_url, path)
     self.assertEqual(expected, rooted_url)