Skip to content

Commit

Permalink
USD rate change (#2481)
Browse files Browse the repository at this point in the history
  • Loading branch information
f213 authored Dec 23, 2024
1 parent a4d234c commit 4a2c82c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
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
Expand All @@ -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
Expand Down Expand Up @@ -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")


Expand Down
2 changes: 1 addition & 1 deletion src/apps/stripebank/bank.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ def get_items(self) -> list[dict[str, Any]]:


class StripeBankUSD(BaseStripeBank):
ue = Decimal(80)
ue = Decimal(90)
currency = "USD"
currency_symbol = "$"
name = _("Stripe USD")
Expand Down

0 comments on commit 4a2c82c

Please sign in to comment.