mirror of
https://github.com/cisagov/manage.get.gov.git
synced 2025-08-16 06:24:12 +02:00
Fix unit tests
This commit is contained in:
parent
fd847a2a40
commit
20f34d56be
2 changed files with 12 additions and 2 deletions
|
@ -110,7 +110,13 @@ class Command(BaseCommand):
|
||||||
reader = csv.DictReader(requested_file, delimiter=seperator)
|
reader = csv.DictReader(requested_file, delimiter=seperator)
|
||||||
# Return a dictionary with the domain name as the key,
|
# Return a dictionary with the domain name as the key,
|
||||||
# and the row information as the value
|
# and the row information as the value
|
||||||
dict_data = {row.get("Domain Name").lower(): row for row in reader}
|
dict_data = {}
|
||||||
|
for row in reader:
|
||||||
|
domain_name = row.get("Domain Name")
|
||||||
|
if domain_name is not None:
|
||||||
|
domain_name = domain_name.lower()
|
||||||
|
row[domain_name] = row
|
||||||
|
|
||||||
return dict_data
|
return dict_data
|
||||||
|
|
||||||
def patch_agency_info(self, debug):
|
def patch_agency_info(self, debug):
|
||||||
|
|
|
@ -39,7 +39,11 @@ class TestPatchAgencyInfo(TestCase):
|
||||||
@patch("registrar.management.commands.utility.terminal_helper.TerminalHelper.query_yes_no_exit", return_value=True)
|
@patch("registrar.management.commands.utility.terminal_helper.TerminalHelper.query_yes_no_exit", return_value=True)
|
||||||
def call_patch_federal_agency_info(self, mock_prompt):
|
def call_patch_federal_agency_info(self, mock_prompt):
|
||||||
"""Calls the patch_federal_agency_info command and mimics a keypress"""
|
"""Calls the patch_federal_agency_info command and mimics a keypress"""
|
||||||
call_command("patch_federal_agency_info", debug=True)
|
call_command(
|
||||||
|
"patch_federal_agency_info",
|
||||||
|
"registrar/tests/data/fake_current_full.csv",
|
||||||
|
debug=True
|
||||||
|
)
|
||||||
|
|
||||||
def test_patch_agency_info(self):
|
def test_patch_agency_info(self):
|
||||||
"""
|
"""
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue