Skip to content

Commit

Permalink
Mock payment verification so that payment is not required for PRE pol…
Browse files Browse the repository at this point in the history
…icy in tests.
  • Loading branch information
derekpierre committed Aug 12, 2024
1 parent 76dbf00 commit 654ae35
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions tests/pre/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
StakingProvidersReservoir,
TACoApplicationAgent,
)
from nucypher.policy.payment import SubscriptionManagerPayment


@pytest.fixture(scope="module", autouse=True)
Expand All @@ -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)

0 comments on commit 654ae35

Please sign in to comment.