Beispiel #1
0
def test_notification_template_get_queryset_orgmember(notification_template,
                                                      user):
    access = NotificationTemplateAccess(user('user', False))
    notification_template.organization.member_role.members.add(
        user('user', False))
    assert access.get_queryset().count() == 0
Beispiel #2
0
def test_notification_template_get_queryset_su(notification_template, user):
    access = NotificationTemplateAccess(user('user', True))
    assert access.get_queryset().count() == 1
Beispiel #3
0
def test_notification_template_get_queryset_org_auditor(
        notification_template, org_auditor):
    access = NotificationTemplateAccess(org_auditor)
    assert access.get_queryset().count() == 1
Beispiel #4
0
def test_notification_template_get_queryset_nonorgmember(
        notification_template, user):
    access = NotificationTemplateAccess(user('user', False))
    assert access.get_queryset().count() == 0