Skip to content

Re-do #71 #81

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

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions python_http_client/exceptions.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@


class HTTPError(Exception):
''' Base of all other errors'''
""" Base of all other errors"""

def __init__(self, error):
self.status_code = error.code
Expand All @@ -13,7 +13,7 @@ def __init__(self, error):
@property
def to_dict(self):
"""
:return: dict of response erro from the API
:return: dict of response error from the API
"""
return json.loads(self.body.decode('utf-8'))

Expand Down
6 changes: 3 additions & 3 deletions tests/test_repofiles.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,13 @@ class RepoFiles(unittest.TestCase):
]

def _all_file(self, files):
'''
"""
Checks the list of files and sees if they exist. If all of them don't
exist, returns False. Otherwise, return True.
'''
"""
return all(map(lambda f: not path.isfile(f), files))

def test_file_existance(self):
def test_file_existence(self):
missing = list(filter(self._all_file, self.FILES))
self.assertTrue(len(missing) == 0,
"Files %s aren't found" % str(missing))
2 changes: 1 addition & 1 deletion tests/test_unit.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ def __init__(self, host, response_code):

def _make_request(self, opener, request):

if 200 <= self.response_code < 299: # if successsful code
if 200 <= self.response_code < 299: # if successful code
return MockResponse(self.response_code)
else:
raise handle_error(MockException(self.response_code))
Expand Down