-
Notifications
You must be signed in to change notification settings - Fork 66
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
6 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,7 @@ | ||
import time | ||
from contextlib import nullcontext as does_not_raise | ||
from datetime import datetime | ||
from decimal import Decimal | ||
|
||
import pytest | ||
from django.contrib.admin.models import CHANGE, LogEntry | ||
|
@@ -26,14 +27,16 @@ def _set_locale(settings): | |
|
||
|
||
@pytest.fixture(autouse=True) | ||
def _adjust_settings(settings): | ||
def _adjust_settings(settings, mocker): | ||
settings.BANKS_REFUNDS_ENABLED = True | ||
settings.ABSOLUTE_HOST = "http://absolute-url.url" | ||
|
||
settings.DANGEROUS_OPERATION_HAPPENED_EMAILS = [ | ||
"[email protected]", | ||
"[email protected]", | ||
] | ||
mocker.patch("apps.stripebank.bank.StripeBankUSD.ue", Decimal(80)) | ||
mocker.patch("apps.stripebank.bank.StripeBankKZT.ue", Decimal("0.18")) | ||
|
||
|
||
@pytest.fixture | ||
|
@@ -63,6 +66,7 @@ def mock_stripe_refund(mocker): | |
|
||
@pytest.fixture | ||
def mock_stripe_kz_refund(mocker): | ||
mocker.patch("apps.stripebank.bank.StripeBankUSD.ue", 70) | ||
return mocker.patch("apps.stripebank.bank.StripeBankKZT.refund") | ||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters