

def test_failed_validation_deleted(self):
    exists = self._fake_usage(is_exists=True, is_deleted=True, mock_deployment=True)
    launched_at = exists.launched_at
    deleted_at = exists.deleted_at
    rec_inst = self._fake_reconciler_instance(launched_at=launched_at, deleted=True, deleted_at=deleted_at)
    self.client.get_instance('RegionOne', INSTANCE_ID_1, get_metadata=True).AndReturn(rec_inst)
    reconcile_vals = {
        'instance': exists.instance,
        'launched_at': exists.launched_at,
        'deleted_at': exists.deleted_at,
        'instance_type_id': exists.instance_type_id,
        'instance_flavor_id': exists.instance_flavor_id,
        'source': 'reconciler:mocked_client',
        'tenant': TENANT_ID_1,
        'os_architecture': DEFAULT_OS_ARCH,
        'os_distro': DEFAULT_OS_DISTRO,
        'os_version': DEFAULT_OS_VERSION,
        'rax_options': DEFAULT_RAX_OPTIONS,
    }
    result = self.mox.CreateMockAnything()
    models.InstanceReconcile(**reconcile_vals).AndReturn(result)
    result.save()
    self.mox.ReplayAll()
    result = self.reconciler.failed_validation(exists)
    self.assertTrue(self)
    self.mox.VerifyAll()

dataset/ETHPy150Open openstack/stacktach/tests/unit/test_reconciler.py ReconcilerTestCase.test_failed_validation_deleted/VarMisuse@203/348 `result`->`self`