def test__restore__causes_the_spy_to_return_none(): spy = Spy() spy.then_return("some value") expect(spy("anything", ["can"], go="here")).to_be("some value") spy.restore() expect(spy("anything", ["can"], go="here")).to_be_none()
def test__then_return__returns_the_given_value_when_the_spy_is_called(): spy = Spy() spy.then_return("some value") expect(spy("anything", ["can"], go="here")).to_be("some value")