Skip to content

Saleor Core: the high performance, composable, headless commerce API.

Checkout urls improvements

Michał Jelonek3e9e9646a2af
diff --git a/saleor/checkout/urls.py b/saleor/checkout/urls.py
index 2fb670d4a1..c36502ec42 100644
--- a/saleor/checkout/urls.py
+++ b/saleor/checkout/urls.py
@@ -5,7 +5,7 @@ from .views.discount import remove_voucher_view
checkout_urlpatterns = [
url(r'^$', views.checkout_index, name='index'),
- url(r'^details/$', views.checkout_details, name='details'),
+ url(r'^start$', views.checkout_start, name='start'),
url(r'^update/(?P<variant_id>\d+)/$',
views.update_checkout_line, name='update-line'),
url(r'^clear/$', views.clear_checkout, name='clear'),
@@ -15,8 +15,7 @@ checkout_urlpatterns = [
name='shipping-address'),
url(r'^shipping-method/', views.checkout_shipping_method,
name='shipping-method'),
- url(r'^order-summary/', views.checkout_order_summary, name='order-summary'),
- url(r'^summary/$', views.cart_summary, name='summary'),
-url(r'^remove_voucher/', remove_voucher_view,
- name='remove-voucher'),
+ url(r'^summary/', views.checkout_order_summary, name='summary'),
+ url(r'^dropdown/$', views.checkout_dropdown, name='dropdown'),
+ url(r'^remove_voucher/', remove_voucher_view, name='remove-voucher'),
url(r'^login/', views.checkout_login, name='login')]
diff --git a/saleor/checkout/views/__init__.py b/saleor/checkout/views/__init__.py
index 997a639ebe..5d98e724c5 100644
--- a/saleor/checkout/views/__init__.py
+++ b/saleor/checkout/views/__init__.py
@@ -31,7 +31,7 @@ from .validators import (
def checkout_login(request, checkout):
"""Allow the user to log in prior to checkout."""
if request.user.is_authenticated:
- return redirect('checkout:index')
+ return redirect('checkout:start')
ctx = {'form': LoginForm()}
return TemplateResponse(request, 'checkout/login.html', ctx)
@@ -39,7 +39,7 @@ def checkout_login(request, checkout):
@get_or_empty_db_checkout(Checkout.objects.for_display())
@validate_checkout
@validate_is_shipping_required
-def checkout_index(request, checkout):
+def checkout_start(request, checkout):
"""Redirect to the initial step of checkout."""
return redirect('checkout:shipping-address')
@@ -73,7 +73,7 @@ def checkout_shipping_method(request, checkout):
initial={'shipping_method': checkout.shipping_method})
if form.is_valid():
form.save()
- return redirect('checkout:order-summary')
+ return redirect('checkout:summary')
ctx = get_checkout_data_for_checkout(checkout, discounts, taxes)
ctx.update({'shipping_method_form': form})
@@ -96,7 +96,7 @@ def checkout_order_summary(request, checkout):
@get_or_empty_db_checkout(checkout_queryset=Checkout.objects.for_display())
-def checkout_details(request, checkout):
+def checkout_index(request, checkout):
"""Display checkout details."""
discounts = request.discounts
taxes = request.taxes
@@ -170,7 +170,7 @@ def checkout_shipping_options(request, checkout):
def update_checkout_line(request, checkout, variant_id):
"""Update the line quantities."""
if not request.is_ajax():
- return redirect('checkout:details')
+ return redirect('checkout:index')
variant = get_object_or_404(ProductVariant, pk=variant_id)
discounts = request.discounts
taxes = request.taxes
@@ -208,7 +208,7 @@ def update_checkout_line(request, checkout, variant_id):
def clear_checkout(request, checkout):
"""Clear checkout."""
if not request.is_ajax():
- return redirect('checkout:details')
+ return redirect('checkout:index')
checkout.lines.all().delete()
update_checkout_quantity(checkout)
response = {'numItems': 0}
@@ -216,7 +216,7 @@ def clear_checkout(request, checkout):
@get_or_empty_db_checkout(checkout_queryset=Checkout.objects.for_display())
-def cart_summary(request, checkout):
+def checkout_dropdown(request, checkout):
"""Display a checkout summary suitable for displaying on all pages."""
discounts = request.discounts
taxes = request.taxes
diff --git a/saleor/checkout/views/discount.py b/saleor/checkout/views/discount.py
index 784f01dd88..b839ba6b03 100644
--- a/saleor/checkout/views/discount.py
+++ b/saleor/checkout/views/discount.py
@@ -61,7 +61,7 @@ def validate_voucher(view):
'Checkout warning',
'This voucher has expired. Please review your checkout.')
messages.warning(request, msg)
- return redirect('checkout:order-summary')
+ return redirect('checkout:summary')
return view(request, checkout)
return func
diff --git a/saleor/checkout/views/summary.py b/saleor/checkout/views/summary.py
index f1a318e3ca..72e6dfe6c8 100644
--- a/saleor/checkout/views/summary.py
+++ b/saleor/checkout/views/summary.py
@@ -31,12 +31,12 @@ def handle_order_placement(request, checkout):
discounts=request.discounts,
taxes=get_taxes_for_checkout(checkout, request.taxes))
except InsufficientStock:
- return redirect('checkout:details')
+ return redirect('checkout:index')
except NotApplicable:
messages.warning(
request, pgettext(
'Checkout warning', 'Please review your checkout.'))
- return redirect('checkout:order-summary')
+ return redirect('checkout:summary')
# remove checkout after order is created
checkout.delete()
diff --git a/saleor/checkout/views/validators.py b/saleor/checkout/views/validators.py
index e091552805..845cc1b05d 100644
--- a/saleor/checkout/views/validators.py
+++ b/saleor/checkout/views/validators.py
@@ -15,7 +15,7 @@ def validate_checkout(view):
def func(request, checkout):
if checkout:
return view(request, checkout)
- return redirect('checkout:details')
+ return redirect('checkout:index')
return func
@@ -66,6 +66,6 @@ def validate_is_shipping_required(view):
@wraps(view)
def func(request, checkout):
if not checkout.is_shipping_required():
- return redirect('checkout:order-summary')
+ return redirect('checkout:summary')
return view(request, checkout)
return func
diff --git a/saleor/product/views.py b/saleor/product/views.py
index ba7bc8a30f..88265a599f 100644
--- a/saleor/product/views.py
+++ b/saleor/product/views.py
@@ -129,9 +129,9 @@ def product_add_to_checkout(request, slug, product_id):
form.save()
if request.is_ajax():
response = JsonResponse(
- {'next': reverse('checkout:details')}, status=200)
+ {'next': reverse('checkout:index')}, status=200)
else:
- response = redirect('checkout:details')
+ response = redirect('checkout:index')
else:
if request.is_ajax():
response = JsonResponse({'error': form.errors}, status=400)
diff --git a/templates/base.html b/templates/base.html
index 7c3d12ae54..515e8b3f83 100644
--- a/templates/base.html
+++ b/templates/base.html
@@ -6,7 +6,7 @@
{% load static %}
{% load translate_url from urls %}
-<html lang="{{ LANGUAGE_CODE }}" class="no-js" data-shipping-options-url="{% url 'checkout:shipping-options' %}" data-cart-summary-url="{% url 'checkout:summary' %}">
+<html lang="{{ LANGUAGE_CODE }}" class="no-js" data-shipping-options-url="{% url 'checkout:shipping-options' %}" data-cart-summary-url="{% url 'checkout:dropdown' %}">
<head>
<title>{% block title %}{{ site.name }}{% endblock %}</title>
{% block meta %}
@@ -143,7 +143,7 @@
</div>
<div class="col-2 col-md-3">
<div class="navbar__brand__cart float-right">
- <a rel="nofollow" class="cart__icon" href="{% url "checkout:details" %}">
+ <a rel="nofollow" class="cart__icon" href="{% url "checkout:index" %}">
<span class="cart-label d-none d-md-inline-block">
{% trans "Your Cart" context "Main navigation item" %}
</span>
@@ -204,7 +204,7 @@
</a>
<hr />
<li>
- <a rel="nofollow" href="{% url "checkout:details" %}">
+ <a rel="nofollow" href="{% url "checkout:index" %}">
{% trans "Your Cart" context "Main navigation item" %}
</a>
</li>
diff --git a/templates/cart_dropdown.html b/templates/cart_dropdown.html
index 0daf27a0ec..279de753d5 100644
--- a/templates/cart_dropdown.html
+++ b/templates/cart_dropdown.html
@@ -51,7 +51,7 @@
<div class="row cart-dropdown__actions">
<div class="col-md-1"></div>
<div class="col-md-5">
- <a href="{% url "checkout:details" %}" class="btn secondary narrow float-md-right">{% trans "Go to cart" context "Checkout dropdown secondary action" %}</a>
+ <a href="{% url "checkout:index" %}" class="btn secondary narrow float-md-right">{% trans "Go to cart" context "Checkout dropdown secondary action" %}</a>
</div>
<div class="col-md-5">
<a href="{% url "checkout:login" %}" class="btn btn-primary narrow float-md-right">{% trans "Checkout" context "Cart dropdown primary action" %}</a>
diff --git a/templates/checkout/index.html b/templates/checkout/index.html
index 814eb9d733..fffbbdde4e 100644
--- a/templates/checkout/index.html
+++ b/templates/checkout/index.html
@@ -9,7 +9,7 @@
{% block breadcrumb %}
<ul class="breadcrumbs list-unstyled">
<li><a href="{% url 'home' %}">{% trans "Home" context "Main navigation item" %}</a></li>
- <li><a rel="nofollow" href="{% url 'checkout:details' %}">{% trans "Cart" context "Cart breadcrumb" %}</a></li>
+ <li><a rel="nofollow" href="{% url 'checkout:index' %}">{% trans "Cart" context "Cart breadcrumb" %}</a></li>
</ul>
{% endblock breadcrumb %}
diff --git a/templates/checkout/login.html b/templates/checkout/login.html
index 9b15a0c394..f4b5094e98 100644
--- a/templates/checkout/login.html
+++ b/templates/checkout/login.html
@@ -14,7 +14,7 @@
data-src="{% static 'images/login-bg.png' %}"
data-srcset="{% static 'images/login-bg.png' %} 1x, {% static 'images/login-bg2x.png' %} 2x">
<p>
- <a href="{% url 'checkout:index' %}" class="btn secondary narrow">
+ <a href="{% url 'checkout:start' %}" class="btn secondary narrow">
{% trans "Continue" context "Checkout login page new users action" %}
</a>
</p>
@@ -22,7 +22,7 @@
</div>
</div>
<div class="col-12 col-md-6 checkout__login__form">
- {% url "checkout:index" as checkout_url %}
+ {% url "checkout:start" as checkout_url %}
<h3>{% trans "Existing customer? Log in." context "Checkout login form title" %}</h3>
{% include "account/partials/login_form.html" with REDIRECT_FIELD_VALUE=checkout_url %}
</div>
diff --git a/tests/test_cart.py b/tests/test_cart.py
index 17b1d67228..383fef001b 100644
--- a/tests/test_cart.py
+++ b/tests/test_cart.py
@@ -431,12 +431,12 @@ def test_replace_checkout_line_form_when_insufficient_stock(
def test_view_empty_checkout(client, request_checkout):
- response = client.get(reverse('checkout:details'))
+ response = client.get(reverse('checkout:index'))
assert response.status_code == 200
def test_view_checkout_without_taxes(client, request_checkout_with_item):
- response = client.get(reverse('checkout:details'))
+ response = client.get(reverse('checkout:index'))
response_checkout_line = response.context[0]['checkout_lines'][0]
checkout_line = request_checkout_with_item.lines.first()
assert not response_checkout_line['get_total'].tax.amount
@@ -447,7 +447,7 @@ def test_view_checkout_without_taxes(client, request_checkout_with_item):
def test_view_checkout_with_taxes(
settings, client, request_checkout_with_item, vatlayer):
settings.DEFAULT_COUNTRY = 'PL'
- response = client.get(reverse('checkout:details'))
+ response = client.get(reverse('checkout:index'))
response_checkout_line = response.context[0]['checkout_lines'][0]
checkout_line = request_checkout_with_item.lines.first()
assert response_checkout_line['get_total'].tax.amount
@@ -490,7 +490,7 @@ def test_view_invalid_update_checkout(client, request_checkout_with_item):
def test_checkout_page_without_openexchagerates(
client, request_checkout_with_item, settings):
settings.OPENEXCHANGERATES_API_KEY = None
- response = client.get(reverse('checkout:details'))
+ response = client.get(reverse('checkout:index'))
context = response.context
assert context['local_checkout_total'] is None
@@ -499,20 +499,20 @@ def test_checkout_page_with_openexchagerates(
client, monkeypatch, request_checkout_with_item, settings):
settings.DEFAULT_COUNTRY = 'PL'
settings.OPENEXCHANGERATES_API_KEY = 'fake-key'
- response = client.get(reverse('checkout:details'))
+ response = client.get(reverse('checkout:index'))
context = response.context
assert context['local_checkout_total'] is None
monkeypatch.setattr(
'django_prices_openexchangerates.models.get_rates',
lambda c: {'PLN': Mock(rate=2)})
- response = client.get(reverse('checkout:details'))
+ response = client.get(reverse('checkout:index'))
context = response.context
assert context['local_checkout_total'].currency == 'PLN'
def test_checkout_summary_page(settings, client, request_checkout_with_item, vatlayer):
settings.DEFAULT_COUNTRY = 'PL'
- response = client.get(reverse('checkout:summary'))
+ response = client.get(reverse('checkout:dropdown'))
assert response.status_code == 200
content = response.context
assert content['quantity'] == request_checkout_with_item.quantity
@@ -526,7 +526,7 @@ def test_checkout_summary_page(settings, client, request_checkout_with_item, vat
def test_checkout_summary_page_empty_checkout(client, request_checkout):
- response = client.get(reverse('checkout:summary'))
+ response = client.get(reverse('checkout:dropdown'))
assert response.status_code == 200
data = response.context
assert data['quantity'] == 0
diff --git a/tests/test_checkout.py b/tests/test_checkout.py
index 1b6d0b3f99..91d4fc01e8 100644
--- a/tests/test_checkout.py
+++ b/tests/test_checkout.py
@@ -71,10 +71,10 @@ def test_clear_shipping_method(checkout, shipping_method):
@pytest.mark.parametrize('checkout_length, is_shipping_required, redirect_url', [
- (0, True, reverse('checkout:details')),
- (0, False, reverse('checkout:details')),
+ (0, True, reverse('checkout:index')),
+ (0, False, reverse('checkout:index')),
(1, True, reverse('checkout:shipping-address')),
- (1, False, reverse('checkout:order-summary'))])
+ (1, False, reverse('checkout:summary'))])
def test_view_checkout_index(
monkeypatch, rf, checkout_length, is_shipping_required, redirect_url):
checkout = Mock(
@@ -82,10 +82,10 @@ def test_view_checkout_index(
is_shipping_required=Mock(return_value=is_shipping_required))
monkeypatch.setattr(
'saleor.checkout.utils.get_checkout_from_request', lambda req, qs: checkout)
- url = reverse('checkout:index')
+ url = reverse('checkout:start')
request = rf.get(url, follow=True)
- response = views.checkout_index(request)
+ response = views.checkout_start(request)
assert response.url == redirect_url
@@ -94,7 +94,7 @@ def test_view_checkout_index_authorized_user(
authorized_client, customer_user, request_checkout_with_item):
request_checkout_with_item.user = customer_user
request_checkout_with_item.save()
- url = reverse('checkout:index')
+ url = reverse('checkout:start')
response = authorized_client.get(url, follow=True)
@@ -171,7 +171,7 @@ def test_view_checkout_shipping_address_without_shipping(
response = client.get(url)
assert response.status_code == 302
- assert get_redirect_location(response) == reverse('checkout:order-summary')
+ assert get_redirect_location(response) == reverse('checkout:summary')
assert not request_checkout.email
@@ -189,7 +189,7 @@ def test_view_checkout_shipping_method(
response = client.post(url, data, follow=True)
- redirect_url = reverse('checkout:order-summary')
+ redirect_url = reverse('checkout:summary')
assert response.request['PATH_INFO'] == redirect_url
@@ -209,7 +209,7 @@ def test_view_checkout_shipping_method_authorized_user(
response = authorized_client.post(url, data, follow=True)
- redirect_url = reverse('checkout:order-summary')
+ redirect_url = reverse('checkout:summary')
assert response.request['PATH_INFO'] == redirect_url
@@ -222,7 +222,7 @@ def test_view_checkout_shipping_method_without_shipping(
response = client.get(url)
assert response.status_code == 302
- assert get_redirect_location(response) == reverse('checkout:order-summary')
+ assert get_redirect_location(response) == reverse('checkout:summary')
def test_view_checkout_shipping_method_without_address(
@@ -245,7 +245,7 @@ def test_view_checkout_summary(
request_checkout_with_item.shipping_method = (
shipping_zone.shipping_methods.first())
request_checkout_with_item.save()
- url = reverse('checkout:order-summary')
+ url = reverse('checkout:summary')
data = {'address': 'shipping_address'}
response = client.get(url)
@@ -274,7 +274,7 @@ def test_view_checkout_summary_authorized_user(
request_checkout_with_item.shipping_method = (
shipping_zone.shipping_methods.first())
request_checkout_with_item.save()
- url = reverse('checkout:order-summary')
+ url = reverse('checkout:summary')
data = {'address': 'shipping_address'}
response = authorized_client.get(url)
@@ -308,7 +308,7 @@ def test_view_checkout_summary_save_language(
request_checkout_with_item.shipping_method = (
shipping_zone.shipping_methods.first())
request_checkout_with_item.save()
- url = reverse('checkout:order-summary')
+ url = reverse('checkout:summary')
data = {'address': 'shipping_address'}
response = authorized_client.get(url, HTTP_ACCEPT_LANGUAGE=user_language)
@@ -327,7 +327,7 @@ def test_view_checkout_summary_save_language(
def test_view_checkout_summary_without_address(request_checkout_with_item, client):
- url = reverse('checkout:order-summary')
+ url = reverse('checkout:summary')
response = client.get(url)
@@ -342,7 +342,7 @@ def test_view_checkout_summary_without_shipping_zone(
request_checkout_with_item.email = '[email protected]'
request_checkout_with_item.save()
- url = reverse('checkout:order-summary')
+ url = reverse('checkout:summary')
response = client.get(url)
assert response.status_code == 302
@@ -361,7 +361,7 @@ def test_view_checkout_summary_with_invalid_voucher(
shipping_zone.shipping_methods.first())
request_checkout_with_item.save()
- url = reverse('checkout:order-summary')
+ url = reverse('checkout:summary')
voucher_url = '{url}?next={url}'.format(url=url)
data = {'discount-voucher': voucher.code}
@@ -394,7 +394,7 @@ def test_view_checkout_summary_with_invalid_voucher_code(
shipping_zone.shipping_methods.first())
request_checkout_with_item.save()
- url = reverse('checkout:order-summary')
+ url = reverse('checkout:summary')
voucher_url = '{url}?next={url}'.format(url=url)
data = {'discount-voucher': 'invalid-code'}
@@ -426,7 +426,7 @@ def test_view_checkout_place_order_with_expired_voucher_code(
# save the checkout
checkout.save()
- checkout_url = reverse('checkout:order-summary')
+ checkout_url = reverse('checkout:summary')
# place order
data = {'address': 'shipping_address'}
@@ -457,8 +457,8 @@ def test_view_checkout_place_order_with_item_out_of_stock(
variant.quantity = 0
variant.save()
- checkout_url = reverse('checkout:order-summary')
- redirect_url = reverse('checkout:details')
+ checkout_url = reverse('checkout:summary')
+ redirect_url = reverse('checkout:index')
# place order
data = {'address': 'shipping_address'}
@@ -482,7 +482,7 @@ def test_view_checkout_place_order_without_shipping_address(
# save the checkout
checkout.save()
- checkout_url = reverse('checkout:order-summary')
+ checkout_url = reverse('checkout:summary')
redirect_url = reverse('checkout:shipping-address')
# place order
@@ -502,7 +502,7 @@ def test_view_checkout_summary_remove_voucher(
shipping_zone.shipping_methods.first())
request_checkout_with_item.save()
- remove_voucher_url = reverse('checkout:order-summary')
+ remove_voucher_url = reverse('checkout:summary')
voucher_url = '{url}?next={url}'.format(url=remove_voucher_url)
data = {'discount-voucher': voucher.code}
diff --git a/tests/test_core.py b/tests/test_core.py
index ef69014699..7744f85424 100644
--- a/tests/test_core.py
+++ b/tests/test_core.py
@@ -213,7 +213,7 @@ def test_set_language_redirects_to_current_endpoint(client):
user_language_point = 'en'
new_user_language = 'fr'
new_user_language_point = '/fr/'
- test_endpoint = 'checkout:details'
+ test_endpoint = 'checkout:index'
# get a English translated url (.../en/...)
# and the expected url after we change it
@@ -244,7 +244,7 @@ def test_set_language_redirects_to_current_endpoint(client):
assert new_url != current_url
# now check if we got redirect the endpoint we wanted to go back
- # in the new language (checkout:details)
+ # in the new language (checkout:index)
assert expected_url == new_url
diff --git a/tests/test_product.py b/tests/test_product.py
index 71a2c8d99b..51111d2a6d 100644
--- a/tests/test_product.py
+++ b/tests/test_product.py
@@ -209,7 +209,7 @@ def test_adding_to_checkout_with_current_user_token(
request_checkout_with_item.user = customer_user
request_checkout_with_item.save()
- response = authorized_client.get(reverse('checkout:details'))
+ response = authorized_client.get(reverse('checkout:index'))
utils.set_checkout_cookie(request_checkout_with_item, response)
authorized_client.cookies[key] = response.cookies[key]
@@ -233,7 +233,7 @@ def test_adding_to_checkout_with_another_user_token(
request_checkout_with_item.user = customer_user
request_checkout_with_item.save()
- response = client.get(reverse('checkout:details'))
+ response = client.get(reverse('checkout:index'))
utils.set_checkout_cookie(request_checkout_with_item, response)
client.cookies[key] = response.cookies[key]
@@ -255,7 +255,7 @@ def test_anonymous_adding_to_checkout_with_another_user_token(
request_checkout_with_item.user = customer_user
request_checkout_with_item.save()
- response = client.get(reverse('checkout:details'))
+ response = client.get(reverse('checkout:index'))
utils.set_checkout_cookie(request_checkout_with_item, response)
client.cookies[key] = response.cookies[key]
@@ -278,7 +278,7 @@ def test_adding_to_checkout_with_deleted_checkout_token(
request_checkout_with_item.save()
old_token = request_checkout_with_item.token
- response = authorized_client.get(reverse('checkout:details'))
+ response = authorized_client.get(reverse('checkout:index'))
utils.set_checkout_cookie(request_checkout_with_item, response)
authorized_client.cookies[key] = response.cookies[key]
@@ -301,7 +301,7 @@ def test_adding_to_checkout_with_closed_checkout_token(
request_checkout_with_item.user = customer_user
request_checkout_with_item.save()
- response = authorized_client.get(reverse('checkout:details'))
+ response = authorized_client.get(reverse('checkout:index'))
utils.set_checkout_cookie(request_checkout_with_item, response)
authorized_client.cookies[key] = response.cookies[key]
variant = product.variants.get()
diff --git a/tests/test_registration.py b/tests/test_registration.py
index 746e32c1de..2e745cf501 100644
--- a/tests/test_registration.py
+++ b/tests/test_registration.py
@@ -40,21 +40,21 @@ def test_login_view_not_valid(client, customer_user):
def test_login_view_next(client, customer_user):
- url = reverse('account:login') + '?next=/en/checkout/details/'
+ url = reverse('account:login') + '?next=/en/checkout/'
post_data = {'username': '[email protected]', 'password': 'password'}
response = client.post(url, post_data, follow=True)
redirect_location = response.request['PATH_INFO']
- assert redirect_location == reverse('checkout:details')
+ assert redirect_location == reverse('checkout:index')
def test_login_view_redirect(client, customer_user):
url = reverse('account:login')
data = {
'username': '[email protected]', 'password': 'password',
- 'next': reverse('checkout:details')}
+ 'next': reverse('checkout:index')}
response = client.post(url, data, follow=True)
redirect_location = response.request['PATH_INFO']
- assert redirect_location == reverse('checkout:details')
+ assert redirect_location == reverse('checkout:index')
def test_logout_view_no_user(client):
@@ -103,10 +103,10 @@ def test_signup_view_redirect(client, customer_user):
url = reverse('account:signup')
data = {
'email': '[email protected]', 'password': 'password',
- 'next': reverse('checkout:index')}
+ 'next': reverse('checkout:start')}
response = client.post(url, data)
redirect_location = get_redirect_location(response)
- assert redirect_location == reverse('checkout:index')
+ assert redirect_location == reverse('checkout:start')
def test_signup_view_fail(client, db, customer_user):