-
-
Notifications
You must be signed in to change notification settings - Fork 290
Expand file tree
/
Copy pathutils.py
More file actions
18 lines (13 loc) · 613 Bytes
/
utils.py
File metadata and controls
18 lines (13 loc) · 613 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
from django.contrib.auth import get_user_model
from django.urls import reverse
from openwisp_users.tests.utils import TestMultitenantAdminMixin
user_model = get_user_model()
class TestAdminMixin(TestMultitenantAdminMixin):
def _test_changelist_recover_deleted(self, app_label, model_label):
self._test_multitenant_admin(
url=reverse('admin:{0}_{1}_changelist'.format(app_label, model_label)),
visible=[],
hidden=[],
)
def _login(self, username='admin', password='tester'):
self.client.force_login(user_model.objects.get(username=username))