Skip to content

Commit afe4cde

Browse files
author
David Garfinkle
committed
Improve repository_tree() recursive test
1 parent f66540a commit afe4cde

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

tools/python_test_v4.py

+3-1
Original file line numberDiff line numberDiff line change
@@ -385,8 +385,10 @@
385385
archive1 = admin_project.repository_archive()
386386
archive2 = admin_project.repository_archive('master')
387387
assert(archive1 == archive2)
388+
# repository with recursive option
389+
admin_project.files.create({'file_path': 'recursive_tree/text.txt', 'branch': 'master', 'content': 'hello, world!', 'commit_message': 'recursive test'})
388390
recursive_tree = admin_project.repository_tree(recursive=True)
389-
assert(len(recursive_tree) != 0)
391+
assert(any(p['path'] == 'recursive_tree/text.txt' for p in recursive_tree))
390392

391393
# project file uploads
392394
filename = "test.txt"

0 commit comments

Comments
 (0)