feat: group Platega admin settings
This commit is contained in:
@@ -749,7 +749,7 @@ SBP_SPEC = PaymentProviderSpec(
|
||||
config_class=PlategaConfig,
|
||||
presentation_class=PlategaSbpPresentation,
|
||||
manifest_fields=_CONFIG_MANIFEST
|
||||
+ _platega_presentation_manifest("Platega SBP", "CreditCard", "PLATEGA_SBP"),
|
||||
+ _platega_presentation_manifest("Platega", "CreditCard", "PLATEGA_SBP"),
|
||||
)
|
||||
|
||||
CRYPTO_SPEC = PaymentProviderSpec(
|
||||
@@ -772,7 +772,7 @@ CRYPTO_SPEC = PaymentProviderSpec(
|
||||
create_webapp_payment=create_crypto_webapp_payment,
|
||||
config_class=PlategaConfig,
|
||||
presentation_class=PlategaCryptoPresentation,
|
||||
manifest_fields=_platega_presentation_manifest("Platega Crypto", "Bitcoin", "PLATEGA_CRYPTO"),
|
||||
manifest_fields=_platega_presentation_manifest("Platega", "Bitcoin", "PLATEGA_CRYPTO"),
|
||||
)
|
||||
|
||||
SPECS = (SBP_SPEC, CRYPTO_SPEC)
|
||||
|
||||
@@ -104,3 +104,15 @@ def test_payment_provider_settings_include_webhook_metadata():
|
||||
assert manifest["PAYMENT_PLATEGA_CRYPTO_WEBAPP_LABEL_RU"]["webhook_path"] == "/webhook/platega"
|
||||
assert manifest["YOOKASSA_SHOP_ID"]["webhook_requires_base_url"] is True
|
||||
assert "webhook_path" not in manifest["PAYMENT_STARS_WEBAPP_LABEL_RU"]
|
||||
|
||||
|
||||
def test_platega_settings_share_one_admin_subsection():
|
||||
manifest = _manifest_by_key()
|
||||
platega_keys = [
|
||||
key
|
||||
for key in manifest
|
||||
if key.startswith("PLATEGA_") or key.startswith("PAYMENT_PLATEGA_")
|
||||
]
|
||||
|
||||
assert platega_keys
|
||||
assert {manifest[key]["subsection"] for key in platega_keys} == {"Platega"}
|
||||
|
||||
Reference in New Issue
Block a user