使用mocker.patch() 方法对get_product_status_by_id 方法进行Mock,并设置返回值; 调用并断言. import pytest from pytest_mock_.product_impl import Product def ...
確定! 回上一頁