Beispiel #1
0
 def test_list(self):
     finder = FileSystemFinder([ASSETS_DIR])
     self.assertItemsEqual(finder.list('js/templates/*'), (
         ('js/templates/readme.txt', os.path.join(ASSETS_DIR, 'js/templates/readme.txt')),
         ('js/templates/a.js.handlebars', os.path.join(ASSETS_DIR, 'js/templates/a.js.handlebars')),
         ('js/templates/b.js.handlebars', os.path.join(ASSETS_DIR, 'js/templates/b.js.handlebars')),
         ('js/templates/c.js.handlebars', os.path.join(ASSETS_DIR, 'js/templates/c.js.handlebars')),
     ))
 def test_find(self):
     finder = FileSystemFinder([ASSETS_DIR])
     self.assertItemsEqual(
         finder.list("js/templates"),
         (
             ("js/templates/readme.txt", os.path.join(ASSETS_DIR, "js/templates/readme.txt")),
             ("js/templates/a.js.handlebars", os.path.join(ASSETS_DIR, "js/templates/a.js.handlebars")),
             ("js/templates/b.js.handlebars", os.path.join(ASSETS_DIR, "js/templates/b.js.handlebars")),
             ("js/templates/c.js.handlebars", os.path.join(ASSETS_DIR, "js/templates/c.js.handlebars")),
         ),
     )
Beispiel #3
0
 def test_list_empty_if_path_isnt_dir(self):
     finder = FileSystemFinder([ASSETS_DIR])
     self.assertItemsEqual(finder.list('js/templates/readme.txt'), ())
Beispiel #4
0
 def test_list_empty_if_path_doesnt_exist(self):
     finder = FileSystemFinder([ASSETS_DIR])
     self.assertItemsEqual(finder.list('js/views'), ())
Beispiel #5
0
 def test_list_empty_if_path_doesnt_exist(self):
     finder = FileSystemFinder([ASSETS_DIR])
     self.assertItemsEqual(finder.list('js/views/*'), ())
 def test_list_empty_if_path_isnt_dir(self):
     finder = FileSystemFinder([ASSETS_DIR])
     self.assertItemsEqual(finder.list('js/templates/readme.txt'), ())