From d6312cab5ba0255626df9c8f5dc1417841213a9f Mon Sep 17 00:00:00 2001 From: Raymond Jessop Date: Fri, 18 Apr 2025 21:15:29 -0500 Subject: [PATCH] updated tests.py again --- django_aws_ses/tests.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/django_aws_ses/tests.py b/django_aws_ses/tests.py index f7af3d7..20627d8 100644 --- a/django_aws_ses/tests.py +++ b/django_aws_ses/tests.py @@ -56,6 +56,8 @@ class DjangoAwsSesTests(TestCase): ) # Retrieve the AwsSesUserAddon created by the post_save signal self.ses_addon = AwsSesUserAddon.objects.get(user=self.user) + # Reset client session to prevent state interference + self.client = self.client_class() @patch('boto3.client') def test_email_sending(self, mock_boto_client): @@ -136,7 +138,7 @@ class DjangoAwsSesTests(TestCase): # Test GET (confirmation page) response = self.client.get(url) self.assertEqual(response.status_code, 200) - self.assertContains(response, 'Please confirm your subscription preference') + self.assertContains(response, 'Please confirm your email subscription preference', html=True) self.assertFalse(self.ses_addon.unsubscribe) # Test POST (unsubscribe)