summaryrefslogtreecommitdiff
path: root/tools/python_test_v4.py
diff options
context:
space:
mode:
authorJames Johnson <d0c.s4vage@gmail.com>2017-09-11 23:20:08 -0500
committerGauvain Pocentek <gauvain@pocentek.net>2017-09-12 06:20:08 +0200
commit29879d61d117ff7909302ed845a6a1eb13814365 (patch)
treefafcb7f7003cc4b5a4146ea6090a76d9bf82082e /tools/python_test_v4.py
parentfd40fce913fbb3cd0e3aa2fd042e20bf1d51e9d6 (diff)
downloadgitlab-29879d61d117ff7909302ed845a6a1eb13814365.tar.gz
adds project upload feature (#239)
Diffstat (limited to 'tools/python_test_v4.py')
-rw-r--r--tools/python_test_v4.py12
1 files changed, 12 insertions, 0 deletions
diff --git a/tools/python_test_v4.py b/tools/python_test_v4.py
index 2113830..386b59b 100644
--- a/tools/python_test_v4.py
+++ b/tools/python_test_v4.py
@@ -258,6 +258,18 @@ archive1 = admin_project.repository_archive()
archive2 = admin_project.repository_archive('master')
assert(archive1 == archive2)
+# project file uploads
+filename = "test.txt"
+file_contents = "testing contents"
+uploaded_file = admin_project.upload(filename, file_contents)
+assert(uploaded_file["alt"] == filename)
+assert(uploaded_file["url"].startswith("/uploads/"))
+assert(uploaded_file["url"].endswith("/" + filename))
+assert(uploaded_file["markdown"] == "[{}]({})".format(
+ uploaded_file["alt"],
+ uploaded_file["url"],
+))
+
# environments
admin_project.environments.create({'name': 'env1', 'external_url':
'http://fake.env/whatever'})