

@mock.patch('nova.db.instance_extra_update_by_uuid')
def test_destroy(self, mock_update):
    objects.MigrationContext._destroy(self.context, fake_instance_uuid)
    self.assertEqual(1, len(update_call.call_args_list))
    update_call = mock_update.call_args
    self.assertEqual(self.context, update_call[0][0])
    self.assertEqual(fake_instance_uuid, update_call[0][1])
    self.assertEqual({
        'migration_context': None,
    }, update_call[0][2])

dataset/ETHPy150Open BU-NU-CLOUD-SP16/Trusted-Platform-Module-nova/nova/tests/unit/objects/test_migration_context.py _TestMigrationContext.test_destroy/VarMisuse@41/64 `mock_update`->`update_call`