From f71cded6e2681788b1f1e45ccbeeae7fd35f4cad Mon Sep 17 00:00:00 2001 From: zandercymatics <141044360+zandercymatics@users.noreply.github.com> Date: Wed, 15 Nov 2023 10:01:03 -0700 Subject: [PATCH] Update test cases / linter --- src/registrar/models/user.py | 1 - src/registrar/tests/test_models.py | 8 ++------ 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/src/registrar/models/user.py b/src/registrar/models/user.py index 69afa3899..2daa3c253 100644 --- a/src/registrar/models/user.py +++ b/src/registrar/models/user.py @@ -5,7 +5,6 @@ from django.db import models from .domain_invitation import DomainInvitation from .transition_domain import TransitionDomain -from .domain_information import DomainInformation from .domain import Domain from phonenumber_field.modelfields import PhoneNumberField # type: ignore diff --git a/src/registrar/tests/test_models.py b/src/registrar/tests/test_models.py index 684e90382..d397cb129 100644 --- a/src/registrar/tests/test_models.py +++ b/src/registrar/tests/test_models.py @@ -628,13 +628,9 @@ class TestUser(TestCase): User.objects.all().delete() def test_check_transition_domains_without_domains_on_login(self): - """A user's on_each_login callback checks transition domains. + """A user's on_each_login callback does not check transition domains. This test makes sure that in the event a domain does not exist for a given transition domain, both a domain and domain invitation are created.""" self.user.on_each_login() - self.assertTrue(Domain.objects.get(name=self.domain_name)) - - domain = Domain.objects.get(name=self.domain_name) - self.assertTrue(DomainInvitation.objects.get(email=self.email, domain=domain)) - self.assertTrue(DomainInformation.objects.get(domain=domain)) + self.assertFalse(Domain.objects.filter(name=self.domain_name).exists())