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")), ), )
def test_list_empty_if_path_isnt_dir(self): finder = FileSystemFinder([ASSETS_DIR]) self.assertItemsEqual(finder.list('js/templates/readme.txt'), ())
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_doesnt_exist(self): finder = FileSystemFinder([ASSETS_DIR]) self.assertItemsEqual(finder.list('js/views/*'), ())