Miroslav Shubernetskiy

Results 99 comments of Miroslav Shubernetskiy

adding another blank line fails precommit scripts too https://github.com/pre-commit/pre-commit-hooks/blob/master/pre_commit_hooks/end_of_file_fixer.py in my case version bump is part of ci process which results in precommit failures like: ``` hookid: end-of-file-fixer Files were...

how do you provide data to `UnifiedAlchemyMagicMock`? 2 provided examples should return empty list unless you do something else

the library does not actually filter anything. as mentioned in the readme it does very limited logic to mimick actual database. it only does that for `.get()` which gets the...

delete is currently not implemented. prs are welcome though! https://github.com/miki725/alchemy-mock/blob/master/alchemy_mock/mocking.py

dont think there is any specific vision. lib attempts to provide some tooling but how its used is up to the user. as for the session being shared, try using...

currently there is no equivalent for `reset_mock_data` but that sounds like a good feature to have. PR is welcome or at some point Ill try to add one

you can use `AlchemyMagicMock` which is like a standard mock but allows to compare sqlalchemy expressions. as such it can mock anything including `subquery` and `select_from`. that will not attempt...

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...

can you give an example of the model which allows `first_item.my_relationship.filter(Foo.bar == 'blah blah').all()`. my understanding that is not possible in SQLAlchemy. `first_item.my_relationship` should either resolve to an object instance...