Saleor Core: the high performance, composable, headless commerce API.
Python cartcheckoutcommercecomposablee-commerceecommercegraphqlheadlessheadless-commercemultichannelomsorder-managementpaymentspimpythonshopshopping-cartstore
Merge branch 'master' into fix-misplaced-tests
NyanKiyoshi8131941aa99e
diff --cc tests/dashboard/test_customer.pyindex 475254a5f4,3dfbd72738..7c6dc6f9b7--- a/tests/dashboard/test_customer.py+++ b/tests/dashboard/test_customer.py@@@ -3,22 -1,26 +3,38 @@@ import jsofrom django.urls import reversefrom saleor.account.models import CustomerNote, User-from saleor.dashboard.customer.forms import (- CustomerDeleteForm, CustomerNoteForm)+from saleor.dashboard.customer.forms import CustomerDeleteForm, CustomerNoteForm+++def test_ajax_users_list(admin_client, admin_user, customer_user):+ users_list = [+ {'id': admin_user.pk, 'text': admin_user.get_ajax_label()},+ {'id': customer_user.pk, 'text': customer_user.get_ajax_label()}]+ url = reverse('dashboard:ajax-users-list')++ response = admin_client.get(url, HTTP_X_REQUESTED_WITH='XMLHttpRequest')+ resp_decoded = json.loads(response.content.decode('utf-8'))++ assert response.status_code == 200+ assert resp_decoded == {'results': users_list}+ def test_customers_list(admin_client):+ response = admin_client.get(reverse('dashboard:customers'))+ assert response.status_code == 200+++ def test_customer_detail_view(admin_client, customer_user):+ response = admin_client.get(+ reverse('dashboard:customer-details', args=[customer_user.pk]))+ assert response.status_code == 200+++ def test_customer_create(admin_client):+ response = admin_client.get(reverse('dashboard:customer-create'))+ assert response.status_code == 200++def test_add_note_to_customer(admin_user, customer_user):customer = customer_usernote = CustomerNote(customer=customer, user=admin_user)