mox

    5熱度

    2回答

    我有一個類: class MyClass(object): @property def myproperty(self): return 'hello' 使用mox和py.test,我如何模擬出myproperty? 我已經試過: mock.StubOutWithMock(myclass, 'myproperty') myclass.myproperty =