You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
E pydantic.error_wrappers.ValidationError: 1 validation error for Tag
E response -> id
E none is not an allowed value (type=type_error.none.not_allowed)
Which leads me to believe that session.add with UnifiedAlchemyMagicMock does not work with auto-incrementing values such as id, in this case. What should I do?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Greetings,
I'm trying to setup tests in a FastAPI API that uses SQLAlchemy and I'm unable to test the creation of resources due to
pydantic
ValidationError.And the test:
It gives the following error:
Which leads me to believe that
session.add
with UnifiedAlchemyMagicMock does not work with auto-incrementing values such asid
, in this case. What should I do?Beta Was this translation helpful? Give feedback.
All reactions