Пример #1
0
 def test_trailing_slash_multi(self):
     """
     Test safe_join with multiple paths that end with a trailing slash.
     """
     path = s3boto3.safe_join("base_url/", "path/to/" "somewhere/")
     self.assertEqual(path, "base_url/path/to/somewhere/")
Пример #2
0
 def test_with_dot(self):
     path = s3boto3.safe_join("", "path/./somewhere/../other", "..", ".",
                              "to/./somewhere")
     self.assertEqual(path, "path/to/somewhere")
Пример #3
0
 def test_base_url_with_slash(self):
     path = s3boto3.safe_join("base_url/", "path/to/somewhere")
     self.assertEqual(path, "base_url/path/to/somewhere")
Пример #4
0
 def test_trailing_slash_multi(self):
     """
     Test safe_join with multiple paths that end with a trailing slash.
     """
     path = s3boto3.safe_join("base_url/", "path/to/" "somewhere/")
     self.assertEquals(path, "base_url/path/to/somewhere/")
Пример #5
0
 def test_normal(self):
     path = s3boto3.safe_join("", "path/to/somewhere", "other",
                              "path/to/somewhere")
     self.assertEqual(path, "path/to/somewhere/other/path/to/somewhere")
Пример #6
0
 def test_base_url_with_slash(self):
     path = s3boto3.safe_join("base_url/", "path/to/somewhere")
     self.assertEquals(path, "base_url/path/to/somewhere")
Пример #7
0
 def test_with_dot(self):
     path = s3boto3.safe_join("", "path/./somewhere/../other", "..",
                              ".", "to/./somewhere")
     self.assertEquals(path, "path/to/somewhere")
Пример #8
0
 def test_normal(self):
     path = s3boto3.safe_join("", "path/to/somewhere", "other", "path/to/somewhere")
     self.assertEquals(path, "path/to/somewhere/other/path/to/somewhere")
Пример #9
0
 def test_base_url(self):
     path = s3boto3.safe_join("base_url", "path/to/somewhere")
     self.assertEquals(path, "base_url/path/to/somewhere")
Пример #10
0
 def test_base_url(self):
     path = s3boto3.safe_join("base_url", "path/to/somewhere")
     self.assertEqual(path, "base_url/path/to/somewhere")