Commits

Ian Lewis  committed 5f7ff4e Draft

[s3boto] Added base url tests for safe_join

  • Participants
  • Parent commits 7768ec8

Comments (0)

Files changed (1)

File storages/tests/s3boto.py

                                 ".", "to/./somewhere")
         self.assertEquals(path, "path/to/somewhere")
 
+    def test_base_url(self):
+        path = s3boto.safe_join("base_url", "path/to/somewhere")
+        self.assertEquals(path, "base_url/path/to/somewhere")
+
+    def test_base_url_with_slash(self):
+        path = s3boto.safe_join("base_url/", "path/to/somewhere")
+        self.assertEquals(path, "base_url/path/to/somewhere")
+
     def test_suspicious_operation(self):
         self.assertRaises(ValueError,
             s3boto.safe_join, "base", "../../../../../../../etc/passwd")