mirror of
https://github.com/cisagov/manage.get.gov.git
synced 2025-08-12 20:49:41 +02:00
Linting on test case, stylistic changes
This commit is contained in:
parent
234af2501f
commit
474e70d1bd
2 changed files with 8 additions and 19 deletions
|
@ -29,7 +29,7 @@
|
||||||
<tr>
|
<tr>
|
||||||
<th data-sortable scope="col" role="columnheader">Email</th>
|
<th data-sortable scope="col" role="columnheader">Email</th>
|
||||||
<th data-sortable scope="col" role="columnheader">Role</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>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
|
@ -137,8 +137,8 @@
|
||||||
</th>
|
</th>
|
||||||
<td data-sort-value="{{ invitation.created_at|date:"U" }}" data-label="Date created">{{ invitation.created_at|date }} </td>
|
<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 data-label="Status">{{ invitation.status|title }}</td>
|
||||||
<td class="grid-col-2"><form method="POST" action="{% url "invitation-delete" pk=invitation.id %}">
|
<td><form method="POST" action="{% url "invitation-delete" pk=invitation.id %}">
|
||||||
{% csrf_token %}<input type="submit" class="usa-button--unstyled" value="Cancel">
|
{% csrf_token %}<input type="submit" class="usa-button--unstyled text-no-underline" value="Cancel">
|
||||||
</form>
|
</form>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
|
@ -1456,31 +1456,20 @@ class TestDomainManagers(TestDomainOverview):
|
||||||
email="pasta@igorville.com",
|
email="pasta@igorville.com",
|
||||||
)
|
)
|
||||||
|
|
||||||
role_1 = UserDomainRole.objects.create(
|
role_1 = UserDomainRole.objects.create(user=dummy_user_1, domain=self.domain, role=UserDomainRole.Roles.MANAGER)
|
||||||
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_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}))
|
response = self.client.get(reverse("domain-users", kwargs={"pk": self.domain.id}))
|
||||||
|
|
||||||
# Make sure we're on the right page
|
# Make sure we're on the right page
|
||||||
self.assertContains(response, "Domain managers")
|
self.assertContains(response, "Domain managers")
|
||||||
|
|
||||||
# Make sure the desired user exists
|
# Make sure the desired user exists
|
||||||
self.assertContains(response, "cheese@igorville.com")
|
self.assertContains(response, "cheese@igorville.com")
|
||||||
|
|
||||||
# Delete dummy_user_1
|
# Delete dummy_user_1
|
||||||
response = self.client.post(
|
response = self.client.post(
|
||||||
reverse(
|
reverse("domain-user-delete", kwargs={"pk": self.domain.id, "user_pk": dummy_user_1.id}), follow=True
|
||||||
"domain-user-delete",
|
|
||||||
kwargs={
|
|
||||||
"pk": self.domain.id,
|
|
||||||
"user_pk": dummy_user_1.id
|
|
||||||
}
|
|
||||||
),
|
|
||||||
follow=True
|
|
||||||
)
|
)
|
||||||
|
|
||||||
# Grab the displayed messages
|
# Grab the displayed messages
|
||||||
|
@ -1497,7 +1486,7 @@ class TestDomainManagers(TestDomainOverview):
|
||||||
self.assertFalse(deleted_user_exists)
|
self.assertFalse(deleted_user_exists)
|
||||||
|
|
||||||
# Ensure that the current user wasn't deleted
|
# 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)
|
self.assertTrue(current_user_exists)
|
||||||
|
|
||||||
# Ensure that the other userdomainrole was not deleted
|
# Ensure that the other userdomainrole was not deleted
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue