From ee666fd57e5cb100b6e195bb74228ac242d8932a Mon Sep 17 00:00:00 2001 From: Gauvain Pocentek Date: Sat, 21 Jan 2017 16:54:16 +0100 Subject: Add support for commit creation Fixes #206 --- tools/python_test.py | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) (limited to 'tools/python_test.py') diff --git a/tools/python_test.py b/tools/python_test.py index 55cb478..2d31d9f 100644 --- a/tools/python_test.py +++ b/tools/python_test.py @@ -161,8 +161,21 @@ admin_project.files.create({'file_path': 'README.rst', readme = admin_project.files.get(file_path='README.rst', ref='master') assert(readme.decode() == 'Initial content') +data = { + 'branch_name': 'master', + 'commit_message': 'blah blah blah', + 'actions': [ + { + 'action': 'create', + 'file_path': 'blah', + 'content': 'blah' + } + ] +} +admin_project.commits.create(data) + tree = admin_project.repository_tree() -assert(len(tree) == 1) +assert(len(tree) == 2) assert(tree[0]['name'] == 'README.rst') blob = admin_project.repository_blob('master', 'README.rst') assert(blob == 'Initial content') -- cgit v1.2.1