From 3f1f0966915a0763b2ad76c7f7bc81ee375bc645 Mon Sep 17 00:00:00 2001 From: Saurabh Kumar <theskumar@users.noreply.github.com> Date: Fri, 22 Jul 2022 11:31:20 +0530 Subject: [PATCH] Make the test_activation_email_includes_link pass --- hypha/apply/users/tests/test_utils.py | 2 ++ hypha/settings/test.py | 2 ++ 2 files changed, 4 insertions(+) diff --git a/hypha/apply/users/tests/test_utils.py b/hypha/apply/users/tests/test_utils.py index 9c68dd86b..6c8533720 100644 --- a/hypha/apply/users/tests/test_utils.py +++ b/hypha/apply/users/tests/test_utils.py @@ -1,5 +1,6 @@ from django.core import mail from django.test import TestCase, override_settings +from django.conf import settings from hypha.apply.users.tests.factories import UserFactory @@ -11,3 +12,4 @@ class TestActivationEmail(TestCase): def test_activation_email_includes_link(self): send_activation_email(UserFactory()) self.assertEqual(len(mail.outbox), 1) + self.assertContains(mail.outbox[0], settings.WAGTAILADMIN_BASE_URL) diff --git a/hypha/settings/test.py b/hypha/settings/test.py index e4936bbfb..6cd3f6fae 100644 --- a/hypha/settings/test.py +++ b/hypha/settings/test.py @@ -22,3 +22,5 @@ STATICFILES_STORAGE = 'django.contrib.staticfiles.storage.StaticFilesStorage' PASSWORD_HASHERS = [ 'django.contrib.auth.hashers.MD5PasswordHasher', ] + +WAGTAILADMIN_BASE_URL = 'http://base-admin-url/' -- GitLab