diff options
author | Angus Salkeld <asalkeld@mirantis.com> | 2015-03-27 14:33:23 +1000 |
---|---|---|
committer | Angus Salkeld <asalkeld@mirantis.com> | 2015-03-27 14:33:23 +1000 |
commit | 04d0e22bf8d7a13434939fc00bcb5c11635addcf (patch) | |
tree | 46919f0a532059dd6185ec1b998bef2413519ef0 /heat/tests/test_common_context.py | |
parent | 7ae372104e0683589f3d14bb3a24398fc2bf1f71 (diff) | |
download | heat-04d0e22bf8d7a13434939fc00bcb5c11635addcf.tar.gz |
Add user_identity to RequestContext.to_dict()
This makes heat logging format more consistent with other
services as oslo.log uses this in the Context formatter:
https://github.com/openstack/oslo.log/blob/master/oslo_log/formatters.py#L214
Change-Id: If85fca19d1e37decc35f965b92e6430e46d9842a
Closes-bug: #1437144
Diffstat (limited to 'heat/tests/test_common_context.py')
-rw-r--r-- | heat/tests/test_common_context.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/heat/tests/test_common_context.py b/heat/tests/test_common_context.py index d470acc69..d53d47e61 100644 --- a/heat/tests/test_common_context.py +++ b/heat/tests/test_common_context.py @@ -43,7 +43,8 @@ class TestRequestContext(common.HeatTestCase): 'tenant': 'atenant', 'auth_url': 'http://xyz', 'aws_creds': 'blah', - 'region_name': 'regionOne'} + 'region_name': 'regionOne', + 'user_identity': 'mick atenant'} super(TestRequestContext, self).setUp() @@ -79,6 +80,8 @@ class TestRequestContext(common.HeatTestCase): ctx = context.RequestContext.from_dict(self.ctx) for k in self.ctx: + if k == 'user_identity': + continue self.assertEqual(self.ctx.get(k), ctx.to_dict().get(k)) override = '%s_override' % k setattr(ctx, k, override) |