Fix test case failures

This commit is contained in:
zandercymatics 2023-12-19 14:43:18 -07:00
parent 12b2f93cb1
commit c01b4ea750
No known key found for this signature in database
GPG key ID: FF4636ABEC9682B7
2 changed files with 5 additions and 6 deletions

View file

@ -5,7 +5,6 @@ import logging
from contextlib import contextmanager
import random
from string import ascii_uppercase
import uuid
from django.test import TestCase
from unittest.mock import MagicMock, Mock, patch
from typing import List, Dict
@ -229,14 +228,14 @@ class AuditedAdminMockData:
user = User.objects.get_or_create(
first_name="{} first_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]
return user
def dummy_contact(self, item_name, short_hand):
"""Creates a dummy contact object"""
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),
title="{} title:{}".format(item_name, short_hand),
email="{}testy@town.com".format(item_name),