Saleor Core: the high performance, composable, headless commerce API.
Python cartcheckoutcommercecomposablee-commerceecommercegraphqlheadlessheadless-commercemultichannelomsorder-managementpaymentspimpythonshopshopping-cartstore
Update test for '_send_set_password_email'
IKarbowiakabc1b684bf43
diff --git a/tests/test_emails.py b/tests/test_emails.pyindex b2ec25bd14..51e542e765 100644--- a/tests/test_emails.py+++ b/tests/test_emails.py@@ -8,7 +8,7 @@ from django.templatetags.static import staticfrom django.urls import reversefrom django.utils.encoding import force_bytesfrom django.utils.http import urlsafe_base64_encode-from templated_email import get_connection, send_templated_mail+from templated_email import get_connectionimport saleor.account.emails as account_emailsimport saleor.order.emails as emails@@ -229,26 +229,20 @@ def test_email_with_email_not_configured_raises_error(settings, site_settings):def test_send_set_password_email(staff_user, site_settings):- site = site_settings.siteuid = urlsafe_base64_encode(force_bytes(staff_user.pk))token = default_token_generator.make_token(staff_user)- logo_url = build_absolute_uri(static("images/logo-light.svg"))password_set_url = build_absolute_uri(reverse("account:reset-password-confirm", kwargs={"token": token, "uidb64": uid}))- ctx = {- "logo_url": logo_url,- "password_set_url": password_set_url,- "site_name": site.name,- }- send_templated_mail(- template_name="dashboard/staff/set_password",- from_email=site_settings.default_from_email,- recipient_list=[staff_user.email],- context=ctx,+ template_name = "dashboard/staff/set_password"+ recipient_email = staff_user.email++ account_emails._send_set_password_email(+ recipient_email, password_set_url, template_name)+assert len(mail.outbox) == 1generated_link = reverse("account:reset-password-confirm", kwargs={"uidb64": uid, "token": token}