Merge "Supply correct arguments to __init__ of a base class"
This commit is contained in:
commit
0192a62212
@ -36,7 +36,7 @@ class UnexpectedResponse(Exception):
|
|||||||
"""
|
"""
|
||||||
|
|
||||||
def __init__(self, message, resp):
|
def __init__(self, message, resp):
|
||||||
super(UnexpectedResponse, self).__init__(self, message)
|
super(UnexpectedResponse, self).__init__(message)
|
||||||
self.resp = resp
|
self.resp = resp
|
||||||
|
|
||||||
|
|
||||||
|
@ -291,6 +291,12 @@ class TestInternalClient(unittest.TestCase):
|
|||||||
except Exception as err:
|
except Exception as err:
|
||||||
pass
|
pass
|
||||||
self.assertEquals(200, err.resp.status_int)
|
self.assertEquals(200, err.resp.status_int)
|
||||||
|
try:
|
||||||
|
client.make_request('GET', '/', {}, (111,))
|
||||||
|
except Exception as err:
|
||||||
|
self.assertTrue(str(err).startswith('Unexpected response'))
|
||||||
|
else:
|
||||||
|
self.fail("Expected the UnexpectedResponse")
|
||||||
finally:
|
finally:
|
||||||
internal_client.sleep = old_sleep
|
internal_client.sleep = old_sleep
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user