From 654ae353c0afa08db7cc235c0c3156e921a39d47 Mon Sep 17 00:00:00 2001 From: derekpierre Date: Mon, 12 Aug 2024 11:51:17 -0400 Subject: [PATCH] Mock payment verification so that payment is not required for PRE policy in tests. --- tests/pre/conftest.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/tests/pre/conftest.py b/tests/pre/conftest.py index 4eac07a..32ec53d 100644 --- a/tests/pre/conftest.py +++ b/tests/pre/conftest.py @@ -6,6 +6,7 @@ StakingProvidersReservoir, TACoApplicationAgent, ) +from nucypher.policy.payment import SubscriptionManagerPayment @pytest.fixture(scope="module", autouse=True) @@ -24,3 +25,8 @@ def mock_reservoir( # uses TACoApplication - should we change this (in `nucypher`)? mock_agent = mock_contract_agency.get_agent(TACoApplicationAgent) mock_agent.get_staking_provider_reservoir = mock_reservoir + + +@pytest.fixture(scope="module", autouse=True) +def mock_payment_method(module_mocker): + module_mocker.patch.object(SubscriptionManagerPayment, "verify", return_value=True)