def test_init_user_creds_id(self):
    ctx_init = utils.dummy_context(user='my_user', password='my_pass')
    ctx_init.request_id = self.ctx.request_id
    creds = ucreds_object.UserCreds.create(ctx_init)
    self.stack = stack.Stack(self.ctx, 'creds_init', self.tmpl, user_creds_id=creds.id)
    self.stack.store()
    self.assertEqual(creds.id, self.stack.user_creds_id)
    ctx_expected = ctx_init.to_dict()
    ctx_expected['auth_token'] = None
    self.assertEqual(ctx_expected, self.stack.stored_context().to_dict())
def test_init_user_creds_id(self):
    ctx_init = utils.dummy_context(user='my_user', password='my_pass')
    ctx_init.request_id = self.ctx.request_id
    creds = ucreds_object.UserCreds.create(ctx_init)
    self.stack = stack.Stack(self.ctx, 'creds_init', self.tmpl, user_creds_id=creds.id)
    self.stack.store()
    self.assertEqual(creds.id, self.stack.user_creds_id)
    ctx_expected = ctx_init.to_dict()
    ctx_expected['auth_token'] = None
    self.assertEqual(ctx_expected, self.stack.stored_context().to_dict())