Skip to content

Commit

Permalink
test setup revision
Browse files Browse the repository at this point in the history
  • Loading branch information
rachidatecs committed Dec 18, 2024
1 parent 14d6196 commit 4a73133
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 9 deletions.
3 changes: 2 additions & 1 deletion src/registrar/tests/test_views_member_domains_json.py
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,8 @@ def test_get_portfolio_member_domains_json_authenticated(self):
@override_flag("organization_feature", active=True)
@override_flag("organization_members", active=True)
def test_get_portfolio_invitedmember_domains_json_authenticated(self):
"""Test that portfolio invitedmember's domains are returned properly for an authenticated user."""
"""Test that portfolio invitedmember's domains are returned properly for an authenticated user.
CANCELED and RETRIEVED invites should be ignored."""
response = self.app.get(
reverse("get_member_domains_json"),
params={"portfolio": self.portfolio.id, "email": self.invited_member_email, "member_only": "true"},
Expand Down
24 changes: 16 additions & 8 deletions src/registrar/tests/test_views_portfolio.py
Original file line number Diff line number Diff line change
Expand Up @@ -2109,12 +2109,18 @@ class TestPortfolioMemberDomainsEditView(TestPortfolioMemberDomainsView):
def setUpClass(cls):
super().setUpClass()
cls.url = reverse("member-domains-edit", kwargs={"pk": cls.portfolio_permission.pk})
names = ["1.gov", "2.gov", "3.gov"]
Domain.objects.bulk_create([Domain(name=name) for name in names])

@classmethod
def tearDownClass(cls):
super().tearDownClass()

def setUp(self):
super().setUp()
names = ["1.gov", "2.gov", "3.gov"]
Domain.objects.bulk_create([Domain(name=name) for name in names])

def tearDown(self):
super().tearDown()
UserDomainRole.objects.all().delete()
Domain.objects.all().delete()

Expand Down Expand Up @@ -2284,17 +2290,19 @@ class TestPortfolioInvitedMemberEditDomainsView(TestPortfolioInvitedMemberDomain
def setUpClass(cls):
super().setUpClass()
cls.url = reverse("invitedmember-domains-edit", kwargs={"pk": cls.invitation.pk})
names = ["1.gov", "2.gov", "3.gov"]
Domain.objects.bulk_create([Domain(name=name) for name in names])

@classmethod
def tearDownClass(cls):
super().tearDownClass()
Domain.objects.all().delete()


def setUp(self):
super().setUp()
names = ["1.gov", "2.gov", "3.gov"]
Domain.objects.bulk_create([Domain(name=name) for name in names])

def tearDown(self):
return super().tearDown()
DomainInvitation.objects.all().delete()
super().tearDown()
Domain.objects.all().delete()

@less_console_noise_decorator
@override_flag("organization_feature", active=True)
Expand Down

0 comments on commit 4a73133

Please sign in to comment.