-
Notifications
You must be signed in to change notification settings - Fork 989
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix upload return codes #4857
Fix upload return codes #4857
Conversation
with six.assertRaisesRegex(self, AuthenticationException, "tururu"): | ||
uploader.upload("fake_url", f) | ||
|
||
def test_403_raises_unauthoirzed_exception_if_no_token(self): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this manages the (my point of view) weird artifactory behavior while uploading
|
||
class UploaderUnitTest(unittest.TestCase): | ||
|
||
def test_401_raises_unauthoirzed_exception(self): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This test a regular behavior of a 401 returned when trying to upload (bintray)
with six.assertRaisesRegex(self, AuthenticationException, "tururu"): | ||
uploader.upload("fake_url", f, auth=auth) | ||
|
||
def test_403_raises_forbidden_exception_if_token(self): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This test a classic wrong token while uploading
Changelog: Bugfix: Fixed authentication management when a server returns 401 uploading a file.
Docs: omit