Skip to content
This repository was archived by the owner on Feb 27, 2023. It is now read-only.

Commit 7d3ccb8

Browse files
committed
#21 Validate license update
Signed-off-by: Uilian Ries <uilianries@gmail.com>
1 parent 2bad30e commit 7d3ccb8

1 file changed

Lines changed: 26 additions & 0 deletions

File tree

tests/test_licenses.py

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,3 +63,29 @@ def test_create_user_proprietary_licenses():
6363
error_message = str(error)
6464
assert "Could not POST (400): 400 Client Error: Bad Request for url: " \
6565
"https://api.bintray.com/users/uilianries/licenses" == error_message
66+
67+
68+
def test_update_org_proprietary_licenses():
69+
bintray = Bintray()
70+
error_message = ""
71+
try:
72+
bintray.update_org_proprietary_license(org="jfrog", custom_license_name="foobar",
73+
license=[{}])
74+
except Exception as error:
75+
error_message = str(error)
76+
77+
assert "Could not PATCH (405): 405 Client Error: Method Not Allowed for url: " \
78+
"https://api.bintray.com/orgs/jfrog/licenses/foobar"
79+
80+
81+
def test_update_user_proprietary_licenses():
82+
bintray = Bintray()
83+
error_message = ""
84+
try:
85+
bintray.update_user_proprietary_license(user="uilianries", custom_license_name="foobar",
86+
license=[{}])
87+
except Exception as error:
88+
error_message = str(error)
89+
90+
assert "Could not PATCH (405): 405 Client Error: Method Not Allowed for url: " \
91+
"https://api.bintray.com/users/uilianries/licenses/foobar"

0 commit comments

Comments
 (0)