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
The mocked session is not behaving as expected. When using a SQLAlchemy session, the following code works:
with Session():
session.add(my_obj)
session.commit()
print(my_obj.to_dict())
to_dict() returns the dictionary version of the object created. When, instead, I use the mocked_session, as soon as session.commit() runs, my_obj.to_dict() returns an empty dictionary.
The text was updated successfully, but these errors were encountered:
The mocked session is not behaving as expected. When using a SQLAlchemy session, the following code works:
to_dict()
returns the dictionary version of the object created. When, instead, I use the mocked_session, as soon assession.commit()
runs,my_obj.to_dict()
returns an empty dictionary.The text was updated successfully, but these errors were encountered: