diff options
author | Gauvain Pocentek <gauvain@pocentek.net> | 2016-05-12 21:03:51 +0200 |
---|---|---|
committer | Gauvain Pocentek <gauvain@pocentek.net> | 2016-05-12 21:04:21 +0200 |
commit | 45adb6e4dbe7667376639d68078754d6d72cb55c (patch) | |
tree | 60edab495b18a7580c9f3a8d9f385f45ebc1fd28 /tools/python_test.py | |
parent | 8ce8218e2fb155c933946d9959a9b53f6a905d21 (diff) | |
download | gitlab-45adb6e4dbe7667376639d68078754d6d72cb55c.tar.gz |
Rename some methods to better match the API URLs
Also deprecate the file_* methods in favor of the files manager.
Diffstat (limited to 'tools/python_test.py')
-rw-r--r-- | tools/python_test.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/tools/python_test.py b/tools/python_test.py index c5e955e..df8de23 100644 --- a/tools/python_test.py +++ b/tools/python_test.py @@ -1,4 +1,5 @@ import base64 +import time import gitlab @@ -135,6 +136,7 @@ admin_project.files.create({'file_path': 'README', 'commit_message': 'Initial commit'}) readme = admin_project.files.get(file_path='README', ref='master') readme.content = base64.b64encode("Improved README") +time.sleep(2) readme.save(branch_name="master", commit_message="new commit") readme.delete(commit_message="Removing README") @@ -145,10 +147,10 @@ admin_project.files.create({'file_path': 'README.rst', readme = admin_project.files.get(file_path='README.rst', ref='master') assert(readme.decode() == 'Initial content') -tree = admin_project.tree() +tree = admin_project.repository_tree() assert(len(tree) == 1) assert(tree[0]['name'] == 'README.rst') -blob = admin_project.blob('master', 'README.rst') +blob = admin_project.repository_blob('master', 'README.rst') assert(blob == 'Initial content') archive1 = admin_project.archive() archive2 = admin_project.archive('master') |