Linting on test case, stylistic changes

This commit is contained in:
zandercymatics 2024-01-18 15:43:42 -07:00
parent 234af2501f
commit 474e70d1bd
No known key found for this signature in database
GPG key ID: FF4636ABEC9682B7
2 changed files with 8 additions and 19 deletions

View file

@ -29,7 +29,7 @@
<tr>
<th data-sortable scope="col" role="columnheader">Email</th>
<th data-sortable scope="col" role="columnheader">Role</th>
<th class="grid-col-2" scope="col" role="columnheader"><span class="sr-only">Action</span></th>
<th class="grid-col-1" scope="col" role="columnheader"><span class="sr-only">Action</span></th>
</tr>
</thead>
<tbody>
@ -137,8 +137,8 @@
</th>
<td data-sort-value="{{ invitation.created_at|date:"U" }}" data-label="Date created">{{ invitation.created_at|date }} </td>
<td data-label="Status">{{ invitation.status|title }}</td>
<td class="grid-col-2"><form method="POST" action="{% url "invitation-delete" pk=invitation.id %}">
{% csrf_token %}<input type="submit" class="usa-button--unstyled" value="Cancel">
<td><form method="POST" action="{% url "invitation-delete" pk=invitation.id %}">
{% csrf_token %}<input type="submit" class="usa-button--unstyled text-no-underline" value="Cancel">
</form>
</td>
</tr>

View file

@ -1456,31 +1456,20 @@ class TestDomainManagers(TestDomainOverview):
email="pasta@igorville.com",
)
role_1 = UserDomainRole.objects.create(
user=dummy_user_1, domain=self.domain, role=UserDomainRole.Roles.MANAGER
)
role_2 = UserDomainRole.objects.create(
user=dummy_user_2, domain=self.domain, role=UserDomainRole.Roles.MANAGER
)
role_1 = UserDomainRole.objects.create(user=dummy_user_1, domain=self.domain, role=UserDomainRole.Roles.MANAGER)
role_2 = UserDomainRole.objects.create(user=dummy_user_2, domain=self.domain, role=UserDomainRole.Roles.MANAGER)
response = self.client.get(reverse("domain-users", kwargs={"pk": self.domain.id}))
# Make sure we're on the right page
self.assertContains(response, "Domain managers")
# Make sure the desired user exists
self.assertContains(response, "cheese@igorville.com")
# Delete dummy_user_1
response = self.client.post(
reverse(
"domain-user-delete",
kwargs={
"pk": self.domain.id,
"user_pk": dummy_user_1.id
}
),
follow=True
reverse("domain-user-delete", kwargs={"pk": self.domain.id, "user_pk": dummy_user_1.id}), follow=True
)
# Grab the displayed messages
@ -1497,7 +1486,7 @@ class TestDomainManagers(TestDomainOverview):
self.assertFalse(deleted_user_exists)
# Ensure that the current user wasn't deleted
current_user_exists = UserDomainRole.objects.filter(id=self.user.id).exists()
current_user_exists = UserDomainRole.objects.filter(user=self.user.id).exists()
self.assertTrue(current_user_exists)
# Ensure that the other userdomainrole was not deleted