file renames

Signed-off-by: CocoByte <nicolle.leclair@gmail.com>
This commit is contained in:
CocoByte 2023-10-25 11:26:26 -06:00
parent 53c74a766f
commit b62a9b4223
No known key found for this signature in database
GPG key ID: BBFAA2526384C97F
2 changed files with 146 additions and 179 deletions

View file

@ -0,0 +1,37 @@
from django.test import TestCase
from registrar.models import (
User,
Domain,
DomainInvitation,
UserDomainRole,
)
class TestLogins(TestCase):
"""Test the retrieval of invitations."""
def setUp(self):
self.domain, _ = Domain.objects.get_or_create(name="igorville.gov")
self.email = "mayor@igorville.gov"
self.invitation, _ = DomainInvitation.objects.get_or_create(
email=self.email, domain=self.domain
)
self.user, _ = User.objects.get_or_create(email=self.email)
# clean out the roles each time
UserDomainRole.objects.all().delete()
def test_migration_functions(self):
""" Run the master migration script using local test data """
""" (analyze the tables just like the migration script does, but add assert statements) """
#TODO: finish me!
self.assertTrue(True)
def test_user_logins(self):
"""A new user's first_login callback retrieves their invitations."""
self.user.first_login()
self.assertTrue(UserDomainRole.objects.get(user=self.user, domain=self.domain))