def test_abandon_nodelete_project(self):
    self.stack = stack.Stack(self.ctx, 'delete_trust', self.tmpl)
    stack_id = self.stack.store()
    self.stack.set_stack_user_project_id(project_id='aproject456')
    db_s = stack_object.Stack.get_by_id(self.ctx, stack_id)
    self.assertIsNotNone(db_s)
    self.stack.delete(abandon=True)
    db_s = stack_object.Stack.get_by_id(self.ctx, stack_id)
    self.assertIsNone(db_s)
    self.assertEqual((stack.Stack.DELETE, stack.Stack.COMPLETE), self.stack.state)
def test_abandon_nodelete_project(self):
    self.stack = stack.Stack(self.ctx, 'delete_trust', self.tmpl)
    stack_id = self.stack.store()
    self.stack.set_stack_user_project_id(project_id='aproject456')
    db_s = stack_object.Stack.get_by_id(self.ctx, stack_id)
    self.assertIsNotNone(db_s)
    self.stack.delete(abandon=True)
    db_s = stack_object.Stack.get_by_id(self.ctx, stack_id)
    self.assertIsNone(db_s)
    self.assertEqual((stack.Stack.DELETE, stack.Stack.COMPLETE), self.stack.state)