Commits

Anonymous committed 0ebe132

test for multiple dir names in test_storage_listdir

  • Participants
  • Parent commits 5015483

Comments (0)

Files changed (1)

File storages/tests/s3boto.py

             file = self.storage.open(self.prefix_path(name), 'w')
             file.write(content)
             file.close()
-        file = self.storage.open(self.prefix_path('foo/bar.txt'), 'w')
-        file.write(content)
-        file.close()
+        dir_names = ["a", "b", "c"]
+        for name in dir_names:
+            file = self.storage.open(self.prefix_path('%s/bar.txt' % name), 'w')
+            file.write(content)
+            file.close()
         dirs, files = self.storage.listdir(self.path_prefix)
         for name in file_names:
             self.assertTrue(name in files)
-        self.assertTrue('foo' in dirs)
+        for name in dir_names:
+            self.assertTrue(name in dirs)
         
     def test_storage_size(self):
         name = self.prefix_path('test_storage_size.txt')