Name : python2-fudge
| |
Version : 1.1.0
| Vendor : openSUSE
|
Release : lp151.3.4
| Date : 2019-03-19 05:44:16
|
Group : Development/Languages/Python
| Source RPM : python-fudge-1.1.0-lp151.3.4.src.rpm
|
Size : 1.08 MB
| |
Packager : https://bugs_opensuse_org
| |
Summary : Replace real objects with fakes (mocks, stubs, etc) while testing
|
Description :
Complete documentation is available at http://farmdev.com/projects/fudge/
Fudge is a Python module for using fake objects (mocks and stubs) to test real ones.
In readable Python code, you declare what methods are available on your fake and how they should be called. Then you inject that into your application and start testing. This declarative approach means you don\'t have to record and playback actions and you don\'t have to inspect your fakes after running code. If the fake object was used incorrectly then you\'ll see an informative exception message with a traceback that points to the culprit.
Here is a quick preview of how you can test code that sends email without actually sending email::
AATTfudge.patch(\'smtplib.SMTP\') def test_mailer(FakeSMTP): (FakeSMTP.expects_call() .expects(\'connect\') .expects(\'sendmail\').with_arg_count(3)) send_mail()
|
RPM found in directory: /vol/rzm3/linux-opensuse/ports/ppc/distribution/leap/15.1/repo/oss/noarch |