alchemy-mock
alchemy-mock copied to clipboard
UnifiedAlchemyMagicMock should support execute
Using session, it is possible to execute plain SQL calls with execute method:
session.execute("select count(*) as count from my_table").fetchone[0]
I did not find out how I could mock such scenarios with UnifiedAlchemyMagicMock
.
Did I oversee something?
Sorry to insist... But is there any workaround to overcome such cases?
you can mock a session with regular AlchemyMagicMock
. unified is meant to mimick orm where you interface with models. not sure how useful that will be to add support there for execute
as there is nothing to unify (e.g. there is no need to call execute()
multiple times where the params need to be merged).