Skip to content

Commit

Permalink
[tests] Removed operator_permission_filters from tests
Browse files Browse the repository at this point in the history
  • Loading branch information
codesankalp authored Mar 8, 2022
1 parent df9bd54 commit 74fc5e1
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions openwisp_radius/tests/test_admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,16 +55,6 @@ class TestAdmin(
app_label = 'openwisp_radius'
app_label_users = 'openwisp_users'

operator_permission_filters = [
{'codename__endswith': 'nas'},
{'codename__endswith': 'accounting'},
{'codename__endswith': 'batch'},
{'codename__endswith': 'check'},
{'codename__endswith': 'reply'},
{'codename__endswith': 'group'},
{'codename__endswith': 'user'},
]

_RADCHECK_ENTRY = {
'username': 'Monica',
'value': 'Cam0_liX',
Expand Down Expand Up @@ -728,6 +718,7 @@ def _create_multitenancy_test_env(
**{'name': 'inactive org', 'is_active': False, 'slug': 'inactive-org'}
)
operator = TestMultitenantAdminMixin()._create_operator()
administrator = self._create_administrator([org1, inactive])
self._create_org_user(organization=org1, user=operator, is_admin=True)
self._create_org_user(organization=inactive, user=operator, is_admin=True)
user11 = User.objects.create(
Expand Down Expand Up @@ -857,6 +848,7 @@ def _create_multitenancy_test_env(
user22=user22,
user33=user33,
operator=operator,
administrator=administrator,
)
if usergroup:
ug1 = self._create_radius_usergroup(user=user11, group=rg1)
Expand Down Expand Up @@ -902,6 +894,7 @@ def test_radiuscheck_organization_fk_queryset(self):
visible=[data['org1'].name],
hidden=[data['org2'].name, data['inactive']],
select_widget=True,
administrator=True,
)

@capture_any_output()
Expand All @@ -915,6 +908,7 @@ def test_radiuscheck_user_fk_queryset(self):
),
visible=[data['user11']],
hidden=[data['user22']],
administrator=True,
)

def test_radiusreply_queryset(self):
Expand All @@ -932,6 +926,7 @@ def test_radiusreply_organization_fk_queryset(self):
visible=[data['org1'].name],
hidden=[data['org2'].name, data['inactive']],
select_widget=True,
administrator=True,
)

@capture_any_output()
Expand All @@ -945,6 +940,7 @@ def test_radiusreply_user_fk_queryset(self):
),
visible=[data['user11']],
hidden=[data['user22']],
administrator=True,
)

def test_radiusgroup_queryset(self):
Expand All @@ -962,6 +958,7 @@ def test_radiusgroup_organization_fk_queryset(self):
visible=[data['org1'].name],
hidden=[data['org2'].name, data['inactive']],
select_widget=True,
administrator=True,
)

def test_nas_queryset(self):
Expand All @@ -979,6 +976,7 @@ def test_nas_organization_fk_queryset(self):
visible=[data['org1'].name],
hidden=[data['org2'].name, data['inactive']],
select_widget=True,
administrator=True,
)

def test_radiusaccounting_queryset(self):
Expand All @@ -1004,6 +1002,7 @@ def test_radiusbatch_organization_fk_queryset(self):
visible=[data['org1'].name],
hidden=[data['org2'].name, data['inactive']],
select_widget=True,
administrator=True,
)

def test_radius_usergroup_queryset(self):
Expand Down Expand Up @@ -1037,6 +1036,7 @@ def test_radius_usergroup_user_fk_queryset(self):
),
visible=[data['user11']],
hidden=[data['user22']],
administrator=True,
)

def test_radius_groupcheck_queryset(self):
Expand Down

0 comments on commit 74fc5e1

Please sign in to comment.