fix: apply persisted provider overrides on startup
This commit is contained in:
@@ -204,7 +204,7 @@ def test_payment_method_keyboard_uses_custom_telegram_text_without_changing_call
|
||||
monkeypatch.setenv("WATA_ENABLED", "True")
|
||||
monkeypatch.setenv("PAYMENT_WATA_TELEGRAM_LABEL_EN", "Wata custom")
|
||||
monkeypatch.setenv("PAYMENT_WATA_TELEGRAM_EMOJI", "💸")
|
||||
build_provider_configs()
|
||||
build_provider_configs(force=True)
|
||||
|
||||
settings = Settings(
|
||||
_env_file=None,
|
||||
|
||||
@@ -398,7 +398,7 @@ class AdminSettingsSecurityTests(unittest.IsolatedAsyncioTestCase):
|
||||
get_provider_bundle,
|
||||
)
|
||||
|
||||
build_provider_configs()
|
||||
build_provider_configs(force=True)
|
||||
bundle = get_provider_bundle("yookassa_service")
|
||||
if bundle and bundle.config is not None:
|
||||
bundle.config.SECRET_KEY = "super-secret"
|
||||
|
||||
@@ -166,7 +166,7 @@ class SettingsTests(unittest.TestCase):
|
||||
os.environ["PAYMENT_YOOKASSA_TELEGRAM_LABEL_EN"] = "Bank card"
|
||||
os.environ["PAYMENT_YOOKASSA_TELEGRAM_EMOJI"] = "💳"
|
||||
try:
|
||||
build_provider_configs()
|
||||
build_provider_configs(force=True)
|
||||
presentation = get_spec_presentation("yookassa")
|
||||
self.assertIsNotNone(presentation)
|
||||
self.assertEqual(presentation.WEBAPP_LABEL_RU, "Карта")
|
||||
|
||||
@@ -340,7 +340,7 @@ class WebAppAssetTests(unittest.IsolatedAsyncioTestCase):
|
||||
current_provider_configs,
|
||||
)
|
||||
|
||||
build_provider_configs()
|
||||
build_provider_configs(force=True)
|
||||
configs = current_provider_configs()
|
||||
for service_key in ("cryptopay_service", "yookassa_service"):
|
||||
bundle = configs.get(service_key)
|
||||
@@ -377,7 +377,7 @@ class WebAppAssetTests(unittest.IsolatedAsyncioTestCase):
|
||||
get_spec_presentation,
|
||||
)
|
||||
|
||||
build_provider_configs()
|
||||
build_provider_configs(force=True)
|
||||
bundle = get_provider_bundle("yookassa_service")
|
||||
if bundle and bundle.config is not None:
|
||||
bundle.config.ENABLED = True
|
||||
|
||||
Reference in New Issue
Block a user