def _(self): with stub(SomeClass.some_class_method) as spy: SomeClass.some_class_method("anything", ["can"], go="here") expect(spy.last_call).to_be((("anything", ["can"]), { "go": "here" })) expect(Spy.get_spy(SomeClass.some_class_method)).to_be(spy)
def _(self): with AttachedSpy(SomeClass, "some_class_method"): SomeClass.some_class_method("anything", ["can"], go="here") expect(SomeClass.some_class_method).was_called()