mirror of
https://github.com/cisagov/manage.get.gov.git
synced 2025-08-06 01:35:22 +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)
|
||||
# Return a dictionary with the domain name as the key,
|
||||
# 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
|
||||
|
||||
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)
|
||||
def call_patch_federal_agency_info(self, mock_prompt):
|
||||
"""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):
|
||||
"""
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue