From 2c859f1d6d620725ddd99c21d75abfec6eec1552 Mon Sep 17 00:00:00 2001 From: woodnt Date: Thu, 8 Sep 2016 14:14:28 -0600 Subject: [PATCH] Correctly initialize TestResponses There's a pretty awful hack currently in place to add the reason attribute to the TestResponse class. This code correctly initializes the class, including the reason attribute. Change-Id: I73384db1f89add051547f4d5db36ab1e647e84ef Closes-Bug: 1613740 --- openstack_auth/tests/data_v3.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/openstack_auth/tests/data_v3.py b/openstack_auth/tests/data_v3.py index 7bf2ec9..7053091 100644 --- a/openstack_auth/tests/data_v3.py +++ b/openstack_auth/tests/data_v3.py @@ -35,11 +35,10 @@ class TestResponse(requests.Response): It also provides some convenience to initialize with a dict. """ - reason = '' def __init__(self, data): self._text = None - super(TestResponse, self) + super(TestResponse, self).__init__() if isinstance(data, dict): self.status_code = data.get('status_code', 200) self.headers = data.get('headers', None)