diff --git a/python_http_client/exceptions.py b/python_http_client/exceptions.py index 4df8956..b6343f2 100644 --- a/python_http_client/exceptions.py +++ b/python_http_client/exceptions.py @@ -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 @@ -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')) diff --git a/tests/test_repofiles.py b/tests/test_repofiles.py index dff4d23..544ce77 100644 --- a/tests/test_repofiles.py +++ b/tests/test_repofiles.py @@ -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)) diff --git a/tests/test_unit.py b/tests/test_unit.py index f9136c5..7f11d46 100644 --- a/tests/test_unit.py +++ b/tests/test_unit.py @@ -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))