climate-commits mailing list archives

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

URL: http://svn.apache.org/r1563525
Log:
CLIMATE-326 - Add /dir/list invalid directory path test

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=1563525&r1=1563524&r2=1563525&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:25
2014
@@ -19,10 +19,15 @@ class TestDirectoryPathList(unittest.Tes
         open(PATH_LEADER + '/test.txt', 'a').close()
 
     def test_valid_path_listing(self):
-        expected_return = {"listing": ["/bar/", "/baz.txt", "/test.txt"]}
+        expected_return = {'listing': ['/bar/', '/baz.txt', '/test.txt']}
         response = test_app.get('http://localhost:8082/dir/list//')
         self.assertDictEqual(response.json, expected_return)
 
+    def test_invalid_path_listing(self):
+        expected_return = {'listing': []}
+        response = test_app.get('http://localhost:8082/dir/list//usr/local')
+        self.assertDictEqual(response.json, expected_return)
+
 class TestDirectoryPathCleaner(unittest.TestCase):
     PATH_LEADER = '/tmp/foo'
     VALID_CLEAN_DIR = '/tmp/foo/bar'



Mime
View raw message