Exemple #1
0
    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 )
Exemple #2
0
def list_files(_):
    """List all files uploaded"""
    return ', '.join(app.list_files())
Exemple #3
0
    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  )
Exemple #4
0
 def test_list_files(self):
     parent_path = os.path.abspath("test_media")
     result = app.list_files(parent_path)
     self.assertEqual(2, len(result))