def test_load_stored_context_true(self):
    ctx_init = utils.dummy_context(user='mystored_user', password='mystored_pass')
    ctx_init.request_id = self.ctx.request_id
    creds = ucreds_object.UserCreds.create(ctx_init)
    self.stack = stack.Stack(self.ctx, 'creds_store4', self.tmpl, user_creds_id=creds.id)
    self.stack.store()
    ctx_expected = ctx_init.to_dict()
    ctx_expected['auth_token'] = None
    load_stack = stack.Stack.load(self.ctx, stack_id=self.stack.id, use_stored_context=True)
    self.assertEqual(ctx_expected, load_stack.context.to_dict())
def test_load_stored_context_true(self):
    ctx_init = utils.dummy_context(user='mystored_user', password='mystored_pass')
    ctx_init.request_id = self.ctx.request_id
    creds = ucreds_object.UserCreds.create(ctx_init)
    self.stack = stack.Stack(self.ctx, 'creds_store4', self.tmpl, user_creds_id=creds.id)
    self.stack.store()
    ctx_expected = ctx_init.to_dict()
    ctx_expected['auth_token'] = None
    load_stack = stack.Stack.load(self.ctx, stack_id=self.stack.id, use_stored_context=True)
    self.assertEqual(ctx_expected, load_stack.context.to_dict())