Silence warning emitted in tests

The instance method `model_name` was being defined multiple times,
causing a redefinition warning.