diff options
Diffstat (limited to 'keystoneclient/tests/unit/v3/utils.py')
-rw-r--r-- | keystoneclient/tests/unit/v3/utils.py | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/keystoneclient/tests/unit/v3/utils.py b/keystoneclient/tests/unit/v3/utils.py index 5781a92..22430fa 100644 --- a/keystoneclient/tests/unit/v3/utils.py +++ b/keystoneclient/tests/unit/v3/utils.py @@ -10,12 +10,16 @@ # License for the specific language governing permissions and limitations # under the License. +import requests import uuid from six.moves.urllib import parse as urlparse +from keystoneauth1.identity import v3 +from keystoneauth1 import session from keystoneclient.tests.unit import client_fixtures from keystoneclient.tests.unit import utils +from keystoneclient.v3 import client def parameterize(ref): @@ -375,3 +379,17 @@ class CrudTests(object): self.stub_entity('DELETE', id=ref['id'], status_code=204) self.manager.delete(ref['id']) + + +class TestRequestId(TestCase): + resp = requests.Response() + TEST_REQUEST_ID = uuid.uuid4().hex + resp.headers['x-openstack-request-id'] = TEST_REQUEST_ID + + def setUp(self): + super(TestRequestId, self).setUp() + auth = v3.Token(auth_url='http://127.0.0.1:5000', + token=self.TEST_TOKEN) + session_ = session.Session(auth=auth) + self.client = client.Client(session=session_, + include_metadata='True')._adapter |