Supply correct arguments to __init__ of a base class
Hopefuly this extra test case is not too inane and slows us down for nothing. It is verified to fail with the old code. Change-Id: I604eca09f7f9ae044a8ad75284cd82a37325f99c
This commit is contained in:
parent
31f706b97b
commit
75086a1330
@ -36,7 +36,7 @@ class UnexpectedResponse(Exception):
|
||||
"""
|
||||
|
||||
def __init__(self, message, resp):
|
||||
super(UnexpectedResponse, self).__init__(self, message)
|
||||
super(UnexpectedResponse, self).__init__(message)
|
||||
self.resp = resp
|
||||
|
||||
|
||||
|
@ -291,6 +291,12 @@ class TestInternalClient(unittest.TestCase):
|
||||
except Exception as err:
|
||||
pass
|
||||
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:
|
||||
internal_client.sleep = old_sleep
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user