'Ensure we can create an instance fault.'

def test_instance_fault_create(self):

    uuid = uuidsentinel.uuid1
    faults = db.instance_fault_get_by_instance_uuids(self.ctxt, [uuid])
    self.assertEqual(0, len(faults[uuid]))
    fault_values = self._create_fault_values(uuid)
    db.instance_create(self.ctxt, {'uuid': uuid})
    fault = db.instance_fault_create(self.ctxt, fault_values)
    ignored_keys = ['deleted', 'created_at', 'updated_at', 'deleted_at', 'id']
    self._assertEqualObjects(fault_values, fault, ignored_keys)
    faults = db.instance_fault_get_by_instance_uuids(self.ctxt, [uuid])
    self.assertEqual(1, len(faults[uuid]))
    self._assertEqualObjects(fault, faults[uuid][0])
