climate-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jo...@apache.org
Subject svn commit: r1563521 - /incubator/climate/trunk/ocw-ui/backend/tests/test_directory_helpers.py
Date Sat, 01 Feb 2014 23:57:18 GMT
Author: joyce
Date: Sat Feb  1 23:57:18 2014
New Revision: 1563521

URL: http://svn.apache.org/r1563521
Log:
CLIMATE-326 - Add tests for relative path removal

Modified:
    incubator/climate/trunk/ocw-ui/backend/tests/test_directory_helpers.py

Modified: incubator/climate/trunk/ocw-ui/backend/tests/test_directory_helpers.py
URL: http://svn.apache.org/viewvc/incubator/climate/trunk/ocw-ui/backend/tests/test_directory_helpers.py?rev=1563521&r1=1563520&r2=1563521&view=diff
==============================================================================
--- incubator/climate/trunk/ocw-ui/backend/tests/test_directory_helpers.py (original)
+++ incubator/climate/trunk/ocw-ui/backend/tests/test_directory_helpers.py Sat Feb  1 23:57:18
2014
@@ -24,3 +24,13 @@ class TestDirectoryPathCleaner(unittest.
 
         clean_path = _get_clean_directory_path(self.PATH_LEADER, '/////bar')
         self.assertEquals(clean_path, self.VALID_CLEAN_DIR)
+
+    def test_relative_path_removal(self):
+        clean_path = _get_clean_directory_path(self.PATH_LEADER, '/../bar')
+        self.assertEquals(clean_path, self.VALID_CLEAN_DIR)
+
+        clean_path = _get_clean_directory_path(self.PATH_LEADER, '/./bar')
+        self.assertEquals(clean_path, self.VALID_CLEAN_DIR)
+
+        clean_path = _get_clean_directory_path(self.PATH_LEADER, '/.././bar')
+        self.assertEquals(clean_path, self.VALID_CLEAN_DIR)



Mime
View raw message