Logoj0ke.net Open Build Service > Projects > server:monitoring > nagios-plugins-nwc-health > Binaries > nagios-plugins-nwc-health-8... > Dependencies
Sign Up | Log In

Dependency of nagios-plugins-nwc-health-8.0-1.1.noarch.rpm

Name: python-fudge

Project: openSUSE_13.2

Repository: oss

Title: 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::

@fudge.patch('smtplib.SMTP')
def test_mailer(FakeSMTP):

(FakeSMTP.expects_call()
.expects('connect')
.expects('sendmail').with_arg_count(3))

send_mail()

Version: 1.0.3

Release: 8.1.6

Architecture: noarch

Size: 143 KB

Build Time: 2014-10-08 20:32:49 +0200 (over 9 years ago)

Provides

Symbol Required by
python-fudge = 1.0.3-8.1.6

Requires

Symbol Provided by
python(abi) = 2.7 python-base