Show More
@@ -191,18 +191,22 b' class TestContentsManager(TestCase):' | |||
|
191 | 191 | |
|
192 | 192 | # Create a sub-sub directory to test getting directory contents with a |
|
193 | 193 | # subdir. |
|
194 |
s |
|
|
195 | self.make_dir(sub_sub_dir_path) | |
|
194 | self.make_dir('foo/bar') | |
|
196 | 195 | |
|
197 | 196 | dirmodel = cm.get('foo') |
|
198 | 197 | self.assertEqual(dirmodel['type'], 'directory') |
|
199 | 198 | self.assertIsInstance(dirmodel['content'], list) |
|
200 | 199 | self.assertEqual(len(dirmodel['content']), 2) |
|
200 | self.assertEqual(dirmodel['path'], 'foo') | |
|
201 | self.assertEqual(dirmodel['name'], 'foo') | |
|
201 | 202 | |
|
202 | 203 | # Directory contents should match the contents of each individual entry |
|
203 | 204 | # when requested with content=False. |
|
204 | 205 | model2_no_content = cm.get(sub_dir + name, content=False) |
|
205 |
sub_sub_dir_no_content = cm.get( |
|
|
206 | sub_sub_dir_no_content = cm.get('foo/bar', content=False) | |
|
207 | self.assertEqual(sub_sub_dir_no_content['path'], 'foo/bar') | |
|
208 | self.assertEqual(sub_sub_dir_no_content['name'], 'bar') | |
|
209 | ||
|
206 | 210 | for entry in dirmodel['content']: |
|
207 | 211 | # Order isn't guaranteed by the spec, so this is a hacky way of |
|
208 | 212 | # verifying that all entries are matched. |
General Comments 0
You need to be logged in to leave comments.
Login now