Check IdentityError messages in tests