Skip to content

Commit

Permalink
fix: remove decode() on error_message string
Browse files Browse the repository at this point in the history
The integration tests failed because a test called 'decode()' on a
string-type variable - the GitLabException class handles byte-to-string
conversion already in its __init__. This commit removes the call to
'decode()' in the test.

```
Traceback (most recent call last):
  File "./tools/python_test_v4.py", line 801, in <module>
    assert 'Retry later' in error_message.decode()
AttributeError: 'str' object has no attribute 'decode'
```
  • Loading branch information
srikanthchelluri committed Jan 9, 2019
1 parent 7a3724f commit 16bda20
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tools/python_test_v4.py
Expand Up @@ -798,7 +798,7 @@
except gitlab.GitlabCreateError as e:
error_message = e.error_message
break
assert 'Retry later' in error_message.decode()
assert 'Retry later' in error_message
[current_project.delete() for current_project in projects]
settings.throttle_authenticated_api_enabled = False
settings.save()
Expand Down

0 comments on commit 16bda20

Please sign in to comment.