def simulate_model_output(model: object, price, gas_price: Optional[int] = None): assert isinstance(price, Wad) or isinstance(price, Ray) assert isinstance(gas_price, int) or gas_price is None model.get_stance = MagicMock( return_value=Stance(price=price, gas_price=gas_price))
def simulate_model_output(self, price: Wad, gas_price: Optional[int] = None): self.model.get_stance = MagicMock( return_value=Stance(price=price, gas_price=gas_price))