mirror of
https://github.com/ansible/awx.git
synced 2026-01-13 02:50:02 -03:30
notifier rbac test made consistent with others
This commit is contained in:
parent
0fcc9abd69
commit
36286bcda2
@ -202,7 +202,7 @@ def notification(notification_template):
|
||||
status='successful',
|
||||
notifications_sent=1,
|
||||
notification_type='email',
|
||||
recipients='admin@admin.com',
|
||||
recipients='admin@redhat.com',
|
||||
subject='email subject')
|
||||
|
||||
@pytest.fixture
|
||||
|
||||
@ -91,13 +91,29 @@ def test_notificaiton_template_orphan_access_org_admin(notification_template, or
|
||||
assert not access.can_change(notification_template, {'organization': organization.id})
|
||||
|
||||
@pytest.mark.django_db
|
||||
def test_notification_access_org_admin(notification, org_admin):
|
||||
def test_notification_access_get_queryset_org_admin(notification, org_admin):
|
||||
access = NotificationAccess(org_admin)
|
||||
assert access.get_queryset().count() == 1
|
||||
|
||||
@pytest.mark.django_db
|
||||
def test_notification_access_get_queryset_org_auditor(notification, org_auditor):
|
||||
access = NotificationAccess(org_auditor)
|
||||
assert access.get_queryset().count() == 1
|
||||
|
||||
@pytest.mark.django_db
|
||||
def test_notification_access_system_admin(notification, admin):
|
||||
access = NotificationAccess(admin)
|
||||
assert access.can_read(notification)
|
||||
assert access.can_delete(notification)
|
||||
|
||||
@pytest.mark.django_db
|
||||
def test_notification_access_org_admin(notification, org_admin):
|
||||
access = NotificationAccess(org_admin)
|
||||
assert access.can_read(notification)
|
||||
assert access.can_delete(notification)
|
||||
|
||||
@pytest.mark.django_db
|
||||
def test_notification_access_org_auditor(notification, org_auditor):
|
||||
access = NotificationAccess(org_auditor)
|
||||
assert access.get_queryset().count() == 1
|
||||
assert access.can_read(notification)
|
||||
assert not access.can_delete(notification)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user