mirror of
https://github.com/cisagov/manage.get.gov.git
synced 2025-08-01 07:26:34 +02:00
Refactor get_sliced_domains to get accurate numbers
This commit is contained in:
parent
7bb3439c3e
commit
cedd54c673
3 changed files with 60 additions and 15 deletions
|
@ -548,6 +548,9 @@ class MockDb(TestCase):
|
|||
state=Domain.State.READY,
|
||||
first_ready=timezone.make_aware(datetime.combine(date.today() + timedelta(days=1), datetime.min.time())),
|
||||
)
|
||||
self.domain_11, _ = Domain.objects.get_or_create(
|
||||
name="cdomain11.gov", state=Domain.State.READY, first_ready=timezone.now()
|
||||
)
|
||||
|
||||
self.domain_information_1, _ = DomainInformation.objects.get_or_create(
|
||||
creator=self.user,
|
||||
|
@ -616,6 +619,14 @@ class MockDb(TestCase):
|
|||
federal_agency="Armed Forces Retirement Home",
|
||||
is_election_board=False,
|
||||
)
|
||||
self.domain_information_11, _ = DomainInformation.objects.get_or_create(
|
||||
creator=self.user,
|
||||
domain=self.domain_11,
|
||||
generic_org_type="federal",
|
||||
federal_agency="World War I Centennial Commission",
|
||||
federal_type="executive",
|
||||
is_election_board=True,
|
||||
)
|
||||
|
||||
meoward_user = get_user_model().objects.create(
|
||||
username="meoward_username", first_name="first_meoward", last_name="last_meoward", email="meoward@rocks.com"
|
||||
|
@ -641,6 +652,10 @@ class MockDb(TestCase):
|
|||
user=meoward_user, domain=self.domain_2, role=UserDomainRole.Roles.MANAGER
|
||||
)
|
||||
|
||||
_, created = UserDomainRole.objects.get_or_create(
|
||||
user=meoward_user, domain=self.domain_11, role=UserDomainRole.Roles.MANAGER
|
||||
)
|
||||
|
||||
with less_console_noise():
|
||||
self.domain_request_1 = completed_domain_request(
|
||||
status=DomainRequest.DomainRequestStatus.STARTED, name="city1.gov"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue