-
Notifications
You must be signed in to change notification settings - Fork 113
Implemented mock support #53
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implemented mock support #53
Conversation
Codecov Report
@@ Coverage Diff @@
## master #53 +/- ##
==========================================
- Coverage 100% 97.82% -2.18%
==========================================
Files 1 1
Lines 107 138 +31
==========================================
+ Hits 107 135 +28
- Misses 0 3 +3
Continue to review full report at Codecov.
|
|
Hey thanks for this! Without having yet looked into the details, this seems like a good contribution. Would you mind updating the documentation as well? I will review the implementation details. |
|
Have you considered using |
|
@txels, heyo! I think you are rigth with Let me time to refactor my stuff: I need remember Thanks you a lot for payin attention on my pull request. |
|
@dmytrostriletskyi Hi, are you still interested in this? |
|
Continuing this effort in another PR to fix and clean up some stuff. Closing this. |
Hello! I frequency use
ddtandmocktogether in my development.I always missed some features in testing, that can make me feel more comfortable.
What is new?
I implemented decorator
mockdata, that may be uses additional to commondataandunpack.This decorator says, that arguments in data values may be mock's
patchobject and related to it (after process it becomeMagicMock) attributes likereturn_valueandside_effect(optional).Usage
Simple example with arguments.
Another one.
Example, where you can see, that
Mockappliedside_effectin background and you get result right away without applying it by yourself.