miki725 / alchemy-mock

SQLAlchemy mock helpers.
Other
82 stars 15 forks source link

Can I mock session.add() ? #15

Closed mcauto closed 5 years ago

mcauto commented 5 years ago

Hello! I love this library!

I want to mock session.add()...

[
    mock.call.add(Model_instance),
    mock.call.commit()
]

help me plz..

miki725 commented 5 years ago

session.add() was not treated in any special way by the library. it stayed as a standard mocked function.

adding initial .add() support in https://github.com/miki725/alchemy-mock/pull/16. you can see usage example in https://github.com/miki725/alchemy-mock/pull/16/files#diff-b09937195996ddc2fe43c8a2b3b836d0R249

miki725 commented 5 years ago

just released new version with basic .add() support. this seems more of a question ticker rather than a bug report but feel free to reopen or create another issue if you have questions/issues/suggestions

mcauto commented 5 years ago

Thank you! It's works!