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:
Pete Zaitcev 2013-09-14 16:09:53 -06:00
parent 31f706b97b
commit 75086a1330
2 changed files with 7 additions and 1 deletions

View File

@ -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

View File

@ -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