I was teaching a class on unit testing to a group of co-workers who were familiar with Simple Test for PHP so I hacked together what is becoming Mocksey.
Mocksey the TDD'd version of that TDD utilty. It's so meta even this acronym.
Either find mocksey on PyPI or install it with pip or easy_install
pip install mocksey #or easy_install mocksey
It's pretty simple. Create a mocked object with generate_mock, inject it (or monkey patch) and set up your assertions. After your function call(s), simply call 'run_asserts' and win!
The unit tests are a pretty decent working example.
Tweaksey is a collection of beautification wrappers. Currently there's only one around mock, but there may be more in the future. It'll look best if you also have nose installed, and may only be worth it in that case, actually. Anyhow, to use it simply import tweaksey from mocksey and get your copy of the mock package from tweaksey.tweak_mock. Your mock assertions should now have a touch more friendliness. If there are more you'd like to add, go for it! Michael Foord, if you want to take the output and run, that cool too (conversely, if you don't like that I did this, I'll kill it square dead).
Tweaksey now requires you to pass in the 'mock' library that you're tweaking. This allows one to apply mocks to python3's unittest.mock.
This software is hereby released under the MIT License, as seen in the LICENSE file
|File||Type||Python Version||Uploaded On||Downloads|
|mocksey-0.3.0.tar.gz||Source||March 11, 2014||954|
|mocksey-0.3.0-py33-none-any.whl||Wheel||3.3||March 11, 2014||987|
|mocksey-0.3.0-py27-none-any.whl||Wheel||2.7||March 11, 2014||851|
|0.3.0||March 11, 2014|
|0.2.2||Aug. 30, 2013|
|0.2.1||Aug. 29, 2013|
|0.2.0||Aug. 27, 2013|
|0.1.5||May 5, 2013|
|0.1.4||April 18, 2013|
|0.1.3||Jan. 31, 2013|
|0.1.2||Jan. 31, 2013|
|0.1.1||Jan. 31, 2013|
|0.1.0||Jan. 31, 2013|
|Feb. 1, 2015, 6:39 p.m.||mocksey||0.1.5||Release Created|
|Feb. 1, 2015, 6:39 p.m.||mocksey||0.1.4||Release Created|
|Feb. 1, 2015, 6:39 p.m.||mocksey||0.1.3||Release Created|
|Feb. 1, 2015, 6:39 p.m.||mocksey||0.1.2||Release Created|
|Feb. 1, 2015, 6:39 p.m.||mocksey||0.1.1||Release Created|
|Feb. 1, 2015, 6:39 p.m.||mocksey||0.1.0||Release Created|
|Feb. 1, 2015, 6:39 p.m.||mocksey||0.2.0||Release Created|
|Feb. 1, 2015, 6:39 p.m.||mocksey||0.2.1||Release Created|
|Feb. 1, 2015, 6:39 p.m.||mocksey||0.2.2||Release Created|
|Feb. 1, 2015, 6:39 p.m.||mocksey||0.3.0||Release Created|
|Feb. 1, 2015, 6:39 p.m.||mocksey||Package Created|