remove test bug

This commit is contained in:
Alysia Broddrick 2023-10-06 16:31:50 -07:00
parent a4057a669f
commit e7094e070f
No known key found for this signature in database
GPG key ID: 03917052CD0F06B7
2 changed files with 6 additions and 5 deletions

View file

@ -449,11 +449,11 @@ class Domain(TimeStampedModel, DomainHelper):
oldNameservers, oldNameservers,
) = self.getNameserverChanges(hosts=hosts) ) = self.getNameserverChanges(hosts=hosts)
successCreatedCount = self._new_host_values(new_values)
successDeletedCount = self._deleted_host_values(deleted_values) # returns value successDeletedCount = self._deleted_host_values(deleted_values) # returns value
_ = self._update_host_values( _ = self._update_host_values(
updated_values, oldNameservers updated_values, oldNameservers
) # returns nothing, just need to be run and errors ) # returns nothing, just need to be run and errors
successCreatedCount = self._new_host_values(new_values)
successTotalNameservers = ( successTotalNameservers = (
len(oldNameservers) - successDeletedCount + successCreatedCount len(oldNameservers) - successDeletedCount + successCreatedCount

View file

@ -1094,7 +1094,7 @@ class TestRegistrantNameservers(MockEppLib):
] ]
self.mockedSendFunction.assert_has_calls(expectedCalls, any_order=True) self.mockedSendFunction.assert_has_calls(expectedCalls, any_order=True)
self.assertTrue(self.domain.is_active()) self.assertTrue(self.domainWithThreeNS.is_active())
def test_user_removes_too_many_nameservers(self): def test_user_removes_too_many_nameservers(self):
""" """
@ -1145,7 +1145,7 @@ class TestRegistrantNameservers(MockEppLib):
] ]
self.mockedSendFunction.assert_has_calls(expectedCalls, any_order=True) self.mockedSendFunction.assert_has_calls(expectedCalls, any_order=True)
self.assertFalse(self.domain.is_active()) self.assertFalse(self.domainWithThreeNS.is_active())
def test_user_replaces_nameservers(self): def test_user_replaces_nameservers(self):
""" """
@ -1157,7 +1157,7 @@ class TestRegistrantNameservers(MockEppLib):
And `commands.UpdateDomain` is sent to add #4 and #5 plus remove #2 and #3 And `commands.UpdateDomain` is sent to add #4 and #5 plus remove #2 and #3
And `commands.DeleteHost` is sent to delete #2 and #3 And `commands.DeleteHost` is sent to delete #2 and #3
""" """
print("in second failing test")
self.domainWithThreeNS.nameservers = [ self.domainWithThreeNS.nameservers = [
(self.nameserver1,), (self.nameserver1,),
("ns1.cats-are-superior1.com",), ("ns1.cats-are-superior1.com",),
@ -1220,7 +1220,7 @@ class TestRegistrantNameservers(MockEppLib):
] ]
self.mockedSendFunction.assert_has_calls(expectedCalls, any_order=True) self.mockedSendFunction.assert_has_calls(expectedCalls, any_order=True)
self.assertTrue(self.domain.is_active()) self.assertTrue(self.domainWithThreeNS.is_active())
def test_user_cannot_add_subordinate_without_ip(self): def test_user_cannot_add_subordinate_without_ip(self):
""" """
@ -1395,6 +1395,7 @@ class TestRegistrantNameservers(MockEppLib):
domain.nameservers = [("ns1.failednameserver.gov", ["4.5.6"])] domain.nameservers = [("ns1.failednameserver.gov", ["4.5.6"])]
def tearDown(self): def tearDown(self):
print("in tear down")
Domain.objects.all().delete() Domain.objects.all().delete()
return super().tearDown() return super().tearDown()