Skip to content
Snippets Groups Projects
Commit 742401f6 authored by Amir MOHAMMADI's avatar Amir MOHAMMADI
Browse files

Add tests for flat=True

parent a590ba6e
No related branches found
No related tags found
1 merge request!23Add an option to return a flat list
Pipeline #
......@@ -43,6 +43,10 @@ class DummyDatabaseSqlTest(unittest.TestCase):
check_file(db.training_files(), 2)
check_file(db.files([1]))
check_file(db.reverse(["test/path"]))
# check if flat returns flat files
assert len(db.all_files(flat=True)) == 2, db.all_files(flat=True)
check_file(db.all_files(flat=True)[0:1])
check_file(db.all_files(flat=True)[1:2])
file = db.objects()[0]
assert db.original_file_name(file) == "original/directory/test/path.orig"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment