def test_list_of_files( self ): assertion_list = ['test.json', 'test.txt', 'percist.json'] dir_list = app.list_files( './test-storage' ) self.assertTrue( assertion_list, dir_list )
def list_files(_): """List all files uploaded""" return ', '.join(app.list_files())
def test_specific_list_of_files( self ): assertion_list = ['percist.json'] dir_list = app.list_files( './test-storage', extension='.json' ) self.assertEquals( assertion_list, dir_list )
def test_list_files(self): parent_path = os.path.abspath("test_media") result = app.list_files(parent_path) self.assertEqual(2, len(result))