From f86e604466cd705b04eafde5219e609ae3172094 Mon Sep 17 00:00:00 2001 From: Rebecca Hsieh Date: Fri, 12 Apr 2024 13:33:31 -0700 Subject: [PATCH] Fix some unit tests states --- src/registrar/tests/test_models_domain.py | 8 ++++---- src/registrar/tests/test_reports.py | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/registrar/tests/test_models_domain.py b/src/registrar/tests/test_models_domain.py index 34c8e33c5..e0dabb493 100644 --- a/src/registrar/tests/test_models_domain.py +++ b/src/registrar/tests/test_models_domain.py @@ -99,7 +99,7 @@ class TestDomainCache(MockEppLib): def test_cache_nested_elements_not_subdomain(self): """Cache works correctly with the nested objects cache and hosts""" with less_console_noise(): - domain, _ = Domain.objects.get_or_create(name="igorville.gov") + domain, _ = Domain.objects.get_or_create(name="igorville.gov", state=Domain.State.DNS_NEEDED) # The contact list will initially contain objects of type 'DomainContact' # this is then transformed into PublicContact, and cache should NOT # hold onto the DomainContact object @@ -203,7 +203,7 @@ class TestDomainCache(MockEppLib): def test_map_epp_contact_to_public_contact(self): # Tests that the mapper is working how we expect with less_console_noise(): - domain, _ = Domain.objects.get_or_create(name="registry.gov") + domain, _ = Domain.objects.get_or_create(name="registry.gov", state=Domain.state.DNS_NEEDED) security = PublicContact.ContactTypeChoices.SECURITY mapped = domain.map_epp_contact_to_public_contact( self.mockDataInfoContact, @@ -1033,7 +1033,7 @@ class TestRegistrantContacts(MockEppLib): And the field `disclose` is set to true for DF.EMAIL """ with less_console_noise(): - domain, _ = Domain.objects.get_or_create(name="igorville.gov") + domain, _ = Domain.objects.get_or_create(name="igorville.gov", domain=Domain.State.DNS_NEEDED) expectedSecContact = PublicContact.get_default_security() expectedSecContact.domain = domain expectedSecContact.email = "123@mail.gov" @@ -2166,7 +2166,7 @@ class TestRegistrantDNSSEC(MockEppLib): ), cleaned=True, ), - call(commands.InfoHost(name='fake.host.com'), cleaned=True), + call(commands.InfoHost(name="fake.host.com"), cleaned=True), call( commands.UpdateDomain( name="dnssec-dsdata.gov", diff --git a/src/registrar/tests/test_reports.py b/src/registrar/tests/test_reports.py index be66cb876..243eb336b 100644 --- a/src/registrar/tests/test_reports.py +++ b/src/registrar/tests/test_reports.py @@ -263,7 +263,7 @@ class ExportDataTest(MockDb, MockEppLib): "adomain10.gov,Federal,Armed Forces Retirement Home,Ready\n" "adomain2.gov,Interstate,(blank),Dns needed\n" "cdomain11.govFederal-ExecutiveWorldWarICentennialCommissionReady\n" - "ddomain3.gov,Federal,Armed Forces Retirement Home,123@mail.gov,On hold,2023-05-25\n" + "ddomain3.gov,Federal,Armed Forces Retirement Home,security@mail.gov,On hold,2023-05-25\n" "defaultsecurity.gov,Federal - Executive,World War I Centennial Commission,(blank),Ready\n" "zdomain12.govInterstateReady\n" )