diff --git a/payments/authorizenet/__init__.py b/payments/authorizenet/__init__.py
index 3c04ca40c..f0cbbc993 100644
--- a/payments/authorizenet/__init__.py
+++ b/payments/authorizenet/__init__.py
@@ -27,7 +27,7 @@ def __init__(
login_id,
transaction_key,
endpoint="https://test.authorize.net/gateway/transact.dll",
- **kwargs
+ **kwargs,
):
self.login_id = login_id
self.transaction_key = transaction_key
@@ -45,9 +45,7 @@ def get_transactions_data(self, payment):
"x_description": payment.description,
"x_first_name": payment.billing_first_name,
"x_last_name": payment.billing_last_name,
- "x_address": "{}, {}".format(
- payment.billing_address_1, payment.billing_address_2
- ),
+ "x_address": f"{payment.billing_address_1}, {payment.billing_address_2}",
"x_city": payment.billing_city,
"x_zip": payment.billing_postcode,
"x_country": payment.billing_country_area,
diff --git a/payments/stripe/test_stripe.py b/payments/stripe/test_stripe.py
index 69fff7778..31f79c3db 100644
--- a/payments/stripe/test_stripe.py
+++ b/payments/stripe/test_stripe.py
@@ -91,11 +91,8 @@ def test_form_contains_stripe_script(self):
self.assertTrue(
''.format(
- PUBLIC_KEY, store_name
- )
- in str(form)
+ f'data-image="" data-key="{PUBLIC_KEY}" data-name="{store_name}" '
+ 'src="https://checkout.stripe.com/checkout.js">' in str(form)
)
def test_form_contains_stripe_script_without_billing_email(self):
@@ -115,11 +112,8 @@ def test_form_contains_stripe_script_without_billing_email(self):
self.assertTrue(
''.format(
- PUBLIC_KEY, store_name
- )
- in str(form)
+ f'data-image="" data-key="{PUBLIC_KEY}" data-name="{store_name}" '
+ 'src="https://checkout.stripe.com/checkout.js">' in str(form)
)
def test_provider_raises_redirect_needed_when_token_does_not_exist(self):