Skip to content

einenlum/prophepy

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Prophepy

Python mocks made for humans. Heavily inspired by the great PHP's Prophecy.

Usage

from examples.calculator import Calculator
from examples.displayer import Displayer
from prophepy import prophesize

calculator = prophesize(Calculator)
displayer = Displayer(calculator._reveal())

calculator.add(2, 3)._should_be_called()
calculator.add(2, 3)._will_return(5)
displayer.display_add(2, 3)

calculator.check_prophecies()

Install

pip install prophepy

Tests

python -m unittest tests/test.py

About

Python mocks made for humans.

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages