

@mock.patch('nova.db.instance_extra_update_by_uuid')
def test_create(self, mock_update):
    ctxt_obj = get_fake_migration_context_obj(self.context)
    ctxt_obj._save()
    self.assertEqual(1, len(mock_update.call_args_list))
    update_call = mock_update.call_args
    self.assertEqual(self.context, update_call[0][0])
    self.assertEqual(fake_instance_uuid, ctxt_obj[0][1])
    self.assertIsInstance(ctxt_obj.new_numa_topology, objects.InstanceNUMATopology)
    self.assertIsNone(ctxt_obj.old_numa_topology)

dataset/ETHPy150Open BU-NU-CLOUD-SP16/Trusted-Platform-Module-nova/nova/tests/unit/objects/test_migration_context.py _TestMigrationContext.test_create/VarMisuse@78/123 `update_call`->`ctxt_obj`