Address feedback and remove head for deployment check

This commit is contained in:
Rebecca Hsieh 2024-02-22 11:44:30 -08:00
parent 68d321143f
commit 0f12a535fb
No known key found for this signature in database
4 changed files with 6 additions and 5 deletions

View file

@ -1779,8 +1779,8 @@ class Domain(TimeStampedModel, DomainHelper):
host_in_db, host_created = Host.objects.get_or_create(domain=self, name=cleaned_host["name"])
# Check if the nameserver is a subdomain of the current domain
# If it is NOT a subdomain, we remove the IP address
if not Domain.isSubdomain(self.name, cleaned_host["name"]):
cleaned_host["addrs"] = [] # or None
if not Domain.isSubdomain(self.name, host_in_db.name):
cleaned_host["addrs"] = []
# Get cleaned list of ips for update
cleaned_ips = cleaned_host["addrs"]
if not host_created:

View file

@ -13,7 +13,7 @@
{% block messages %}
{% include "includes/form_messages.html" %}
{% endblock %}
<h1>Manage your domains - TESTING TESTING 1234</h2>
<h1>Manage your domains</h2>
<p class="margin-top-4">
<a href="{% url 'application:' %}" class="usa-button"

View file

@ -1084,7 +1084,8 @@ class MockEppLib(TestCase):
}
# Retrieve the corresponding values from the dictionary
res_data, extensions = request_mappings.get(request_name, (self.mockDataInfoHosts, None)) # default
default_mapping = (self.mockDataInfoHosts, None)
res_data, extensions = request_mappings.get(request_name, default_mapping)
return MagicMock(
res_data=[res_data],

View file

@ -113,7 +113,7 @@ class TestDomainCache(MockEppLib):
}
expectedHostsDict = {
"name": self.mockDataInfoDomain.hosts[0],
"addrs": [], # hould return empty bc fake.host.com is not a subdomain of igorville.gov
"addrs": [], # should return empty bc fake.host.com is not a subdomain of igorville.gov
"cr_date": self.mockDataInfoHosts.cr_date,
}