from mock import MagicMock #MagicMock为Mock的子类 >>> thing = ProductionClass() >>> thing.method = MagicMock(return_value=3) #指定返回3 ...
確定! 回上一頁