mirror of
https://github.com/cisagov/manage.get.gov.git
synced 2025-05-16 17:47:02 +02:00
Fix test case failures
This commit is contained in:
parent
12b2f93cb1
commit
c01b4ea750
2 changed files with 5 additions and 6 deletions
|
@ -5,7 +5,6 @@ import logging
|
||||||
from contextlib import contextmanager
|
from contextlib import contextmanager
|
||||||
import random
|
import random
|
||||||
from string import ascii_uppercase
|
from string import ascii_uppercase
|
||||||
import uuid
|
|
||||||
from django.test import TestCase
|
from django.test import TestCase
|
||||||
from unittest.mock import MagicMock, Mock, patch
|
from unittest.mock import MagicMock, Mock, patch
|
||||||
from typing import List, Dict
|
from typing import List, Dict
|
||||||
|
@ -229,14 +228,14 @@ class AuditedAdminMockData:
|
||||||
user = User.objects.get_or_create(
|
user = User.objects.get_or_create(
|
||||||
first_name="{} first_name:{}".format(item_name, short_hand),
|
first_name="{} first_name:{}".format(item_name, short_hand),
|
||||||
last_name="{} last_name:{}".format(item_name, short_hand),
|
last_name="{} last_name:{}".format(item_name, short_hand),
|
||||||
username="{} username:{}".format(item_name + str(uuid.uuid4())[:8], short_hand),
|
username="{} username:{}".format(item_name, short_hand),
|
||||||
)[0]
|
)[0]
|
||||||
return user
|
return user
|
||||||
|
|
||||||
def dummy_contact(self, item_name, short_hand):
|
def dummy_contact(self, item_name, short_hand):
|
||||||
"""Creates a dummy contact object"""
|
"""Creates a dummy contact object"""
|
||||||
contact = Contact.objects.get_or_create(
|
contact = Contact.objects.get_or_create(
|
||||||
first_name="{} first_name:{}".format(item_name, short_hand),
|
first_name="{} first_name:{}".format(item_name + "fake_contact", short_hand),
|
||||||
last_name="{} last_name:{}".format(item_name, short_hand),
|
last_name="{} last_name:{}".format(item_name, short_hand),
|
||||||
title="{} title:{}".format(item_name, short_hand),
|
title="{} title:{}".format(item_name, short_hand),
|
||||||
email="{}testy@town.com".format(item_name),
|
email="{}testy@town.com".format(item_name),
|
||||||
|
|
|
@ -1318,8 +1318,8 @@ class AuditedAdminTest(TestCase):
|
||||||
tested_fields = [
|
tested_fields = [
|
||||||
DomainApplication.authorizing_official.field,
|
DomainApplication.authorizing_official.field,
|
||||||
DomainApplication.submitter.field,
|
DomainApplication.submitter.field,
|
||||||
# DomainApplication.investigator.field,
|
DomainApplication.investigator.field,
|
||||||
# DomainApplication.creator.field,
|
DomainApplication.creator.field,
|
||||||
DomainApplication.requested_domain.field,
|
DomainApplication.requested_domain.field,
|
||||||
]
|
]
|
||||||
|
|
||||||
|
@ -1374,7 +1374,7 @@ class AuditedAdminTest(TestCase):
|
||||||
tested_fields = [
|
tested_fields = [
|
||||||
DomainInformation.authorizing_official.field,
|
DomainInformation.authorizing_official.field,
|
||||||
DomainInformation.submitter.field,
|
DomainInformation.submitter.field,
|
||||||
# DomainInformation.creator.field,
|
DomainInformation.creator.field,
|
||||||
(DomainInformation.domain.field, ["name"]),
|
(DomainInformation.domain.field, ["name"]),
|
||||||
(DomainInformation.domain_application.field, ["requested_domain__name"]),
|
(DomainInformation.domain_application.field, ["requested_domain__name"]),
|
||||||
]
|
]
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue