From 804d19f30eb6c1be39f99e34dfe993b572d6dfef Mon Sep 17 00:00:00 2001 From: Erin Song <121973038+erinysong@users.noreply.github.com> Date: Tue, 27 Aug 2024 17:43:08 -0700 Subject: [PATCH] remove submitter from orphan tests --- src/registrar/tests/test_admin_request.py | 4 +++- src/registrar/tests/test_emails.py | 1 - src/registrar/tests/test_views.py | 22 ---------------------- 3 files changed, 3 insertions(+), 24 deletions(-) diff --git a/src/registrar/tests/test_admin_request.py b/src/registrar/tests/test_admin_request.py index 5a1236d49..5b688343a 100644 --- a/src/registrar/tests/test_admin_request.py +++ b/src/registrar/tests/test_admin_request.py @@ -35,6 +35,7 @@ from .common import ( GenericTestHelper, ) from unittest.mock import patch +from waffle.testutils import override_flag from django.conf import settings import boto3_mocking # type: ignore @@ -149,7 +150,7 @@ class TestDomainRequestAdmin(MockEppLib): # These should exist in the response expected_values = [ - ("creator", "Person who submitted the domain request; will receive email updates"), + ("creator", "Person who submitted the domain request. Will receive email updates"), ("approved_domain", "Domain associated with this request; will be blank until request is approved"), ("no_other_contacts_rationale", "Required if creator does not list other employees"), ("alternative_domains", "Other domain names the creator provided for consideration"), @@ -894,6 +895,7 @@ class TestDomainRequestAdmin(MockEppLib): self.transition_state_and_send_email(domain_request, DomainRequest.DomainRequestStatus.SUBMITTED) self.assertEqual(len(self.mock_client.EMAILS_SENT), 3) + @override_flag("profile_feature", True) @less_console_noise_decorator def test_save_model_sends_approved_email(self): """When transitioning to approved on a domain request, diff --git a/src/registrar/tests/test_emails.py b/src/registrar/tests/test_emails.py index 8cf707004..cc8b0c4b1 100644 --- a/src/registrar/tests/test_emails.py +++ b/src/registrar/tests/test_emails.py @@ -69,7 +69,6 @@ class TestEmails(TestCase): # check for optional things self.assertIn("Other employees from your organization:", body) - self.assertIn("Testy2 Tester2", body) self.assertIn("Current websites:", body) self.assertIn("city.com", body) self.assertIn("About your organization:", body) diff --git a/src/registrar/tests/test_views.py b/src/registrar/tests/test_views.py index f142fb966..8b2743059 100644 --- a/src/registrar/tests/test_views.py +++ b/src/registrar/tests/test_views.py @@ -358,10 +358,6 @@ class HomeTests(TestWithUser): first_name="Henry", last_name="Mcfakerson", ) - contact_shared = Contact.objects.create( - first_name="Relative", - last_name="Aether", - ) # Create two non-orphaned contacts contact_2 = Contact.objects.create( @@ -369,12 +365,6 @@ class HomeTests(TestWithUser): last_name="Mars", ) - # Attach a user object to a contact (should not be deleted) - contact_user, _ = Contact.objects.get_or_create( - first_name="Hank", - last_name="McFakey", - ) - site = DraftDomain.objects.create(name="igorville.gov") domain_request = DomainRequest.objects.create( creator=self.user, @@ -407,8 +397,6 @@ class HomeTests(TestWithUser): # Check if the orphaned contacts were deleted orphan = Contact.objects.filter(id=contact.id) self.assertFalse(orphan.exists()) - orphan = Contact.objects.filter(id=contact_user.id) - self.assertFalse(orphan.exists()) try: edge_case = Contact.objects.filter(id=contact_2.id).get() @@ -430,10 +418,6 @@ class HomeTests(TestWithUser): first_name="Henry", last_name="Mcfakerson", ) - contact_shared = Contact.objects.create( - first_name="Relative", - last_name="Aether", - ) # Create two non-orphaned contacts contact_2 = Contact.objects.create( @@ -441,12 +425,6 @@ class HomeTests(TestWithUser): last_name="Mars", ) - # Attach a user object to a contact (should not be deleted) - contact_user, _ = Contact.objects.get_or_create( - first_name="Hank", - last_name="McFakey", - ) - site = DraftDomain.objects.create(name="igorville.gov") domain_request = DomainRequest.objects.create( creator=self.user,