Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Aug 14, 2023
1 parent dbaf98a commit 17d505e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 14 deletions.
6 changes: 2 additions & 4 deletions payments/authorizenet/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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,
Expand Down
14 changes: 4 additions & 10 deletions payments/stripe/test_stripe.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,11 +91,8 @@ def test_form_contains_stripe_script(self):
self.assertTrue(
'<script class="stripe-button" data-amount="10000" '
'data-currency="USD" data-description="payment" data-email="[email protected]" '
'data-image="" data-key="{}" data-name="{}" '
'src="https://checkout.stripe.com/checkout.js"></script>'.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"></script>' in str(form)
)

def test_form_contains_stripe_script_without_billing_email(self):
Expand All @@ -115,11 +112,8 @@ def test_form_contains_stripe_script_without_billing_email(self):
self.assertTrue(
'<script class="stripe-button" data-amount="10000" '
'data-currency="USD" data-description="payment" '
'data-image="" data-key="{}" data-name="{}" '
'src="https://checkout.stripe.com/checkout.js"></script>'.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"></script>' in str(form)
)

def test_provider_raises_redirect_needed_when_token_does_not_exist(self):
Expand Down

0 comments on commit 17d505e

Please sign in to comment.