You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@climate.apache.org by jo...@apache.org on 2014/02/02 00:57:25 UTC
svn commit: r1563525 -
/incubator/climate/trunk/ocw-ui/backend/tests/test_directory_helpers.py
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'