:param kwargs: Extra arguments that might be present, but we ignore
because they possibly came in from older rpc messages.
"""
- if kwargs:
- LOG.warn(_('Arguments dropped when creating context: %s') %
- str(kwargs))
self.user_id = user_id
self.project_id = project_id
'read_deleted',
True)
- def test_extra_args_to_context_get_logged(self):
- info = {}
-
- def fake_warn(log_msg):
- info['log_msg'] = log_msg
-
- self.stubs.Set(context.LOG, 'warn', fake_warn)
-
- c = context.RequestContext('user',
- 'project',
- extra_arg1='meow',
- extra_arg2='wuff')
- self.assertTrue(c)
- self.assertIn("'extra_arg1': 'meow'", info['log_msg'])
- self.assertIn("'extra_arg2': 'wuff'", info['log_msg'])
-
def test_service_catalog_nova_only(self):
service_catalog = [
{u'type': u'compute', u'name': u'nova'},