fudge

Replace real objects with fakes (mocks, stubs, etc) while testing.
Download

fudge Ranking & Summary

Advertisement

  • Rating:
  • License:
  • MIT/X Consortium Lic...
  • Price:
  • FREE
  • Publisher Name:
  • Kumar McMillan
  • Publisher web site:
  • http://farmdev.com/

fudge Tags


fudge Description

Replace real objects with fakes (mocks, stubs, etc) while testing. fudge is a Python module designed for two specific situations:* Replace an objectTemporarily return a canned value for a method or allow a method to be called without affect.* Ensure an object is used correctlyDeclare 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') Requirements: · Python


fudge Related Software