fudge 0.9.3
Replace real objects with fakes (mocks, stubs, etc) while testing.
Latest Version: 1.0.3
Complete documentation is available at http://farmdev.com/projects/fudge/
This module is designed for two specific situations:
- Replace an object
- Temporarily return a canned value for a method or allow a method to be called without affect.
- Ensure an object is used correctly
- Declare expectations about what methods should be called and what arguments should be sent.
Here is a quick preview of how you can test code that sends email without actually sending email:
>>> import fudge
>>> SMTP = fudge.Fake('SMTP')
>>> SMTP = SMTP.expects('__init__')
>>> SMTP = SMTP.expects('connect')
>>> SMTP = SMTP.expects('sendmail').with_arg_count(3)
>>> SMTP = SMTP.expects('close')
| File | Type | Py Version | Uploaded on | Size | # downloads |
|---|---|---|---|---|---|
| fudge-0.9.3-py2.5.egg (md5, pgp) | Python Egg | 2.5 | 2009-08-30 | 56KB | 590 |
| fudge-0.9.3.tar.gz (md5, pgp) | Source | 2009-08-30 | 76KB | 614 | |
- Author: Kumar McMillan
- Home Page: http://farmdev.com/projects/fudge/
- License: The MIT License
- Package Index Owner: kumar303
- DOAP record: fudge-0.9.3.xml
