-
Notifications
You must be signed in to change notification settings - Fork 26
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
25 additions
and
0 deletions.
There are no files selected for viewing
25 changes: 25 additions & 0 deletions
25
src/openforms/registrations/contrib/objects_api/tests/test_admin.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
from django.urls import reverse | ||
|
||
from django_webtest import WebTest | ||
from maykin_2fa.test import disable_admin_mfa | ||
|
||
from openforms.accounts.tests.factories import UserFactory | ||
|
||
from ..models import ObjectsAPIGroupConfig | ||
|
||
|
||
@disable_admin_mfa() | ||
class ObjectsAPIGroupConfigAdminTest(WebTest): | ||
def test_name(self): | ||
ObjectsAPIGroupConfig.objects.create(name="test group") | ||
user = UserFactory.create(is_superuser=True, is_staff=True) | ||
|
||
response = self.app.get( | ||
reverse("admin:registrations_objects_api_objectsapigroupconfig_changelist"), | ||
user=user, | ||
) | ||
|
||
table = response.html.find("table", {"id": "result_list"}) | ||
row = table.find("tbody").find("tr") | ||
|
||
self.assertEqual(row.find("th").string, "test group") |