mirror of
https://github.com/Nebucatnetzer/network_inventory.git
synced 2024-07-21 15:17:32 +02:00
46 lines
1.2 KiB
Python
46 lines
1.2 KiB
Python
import pytest
|
|
|
|
from django.urls import reverse
|
|
|
|
|
|
@pytest.mark.django_db
|
|
def test_unauthorized_request_backup_method(api_client):
|
|
url = reverse('backup-method-list')
|
|
response = api_client.get(url)
|
|
assert response.status_code == 403
|
|
|
|
|
|
@pytest.mark.django_db
|
|
def test_unauthorized_request_backup(api_client):
|
|
url = reverse('backup-list')
|
|
response = api_client.get(url)
|
|
assert response.status_code == 403
|
|
|
|
|
|
@pytest.mark.django_db
|
|
def test_unauthorized_request_target_device(api_client):
|
|
url = reverse('target-device-list')
|
|
response = api_client.get(url)
|
|
assert response.status_code == 403
|
|
|
|
|
|
@pytest.mark.django_db
|
|
def test_unauthorized_request_notificaton_from_backup(api_client):
|
|
url = reverse('notification-from-backup-list')
|
|
response = api_client.get(url)
|
|
assert response.status_code == 403
|
|
|
|
|
|
@pytest.mark.django_db
|
|
def test_unauthorized_request_notificaton(api_client):
|
|
url = reverse('notification-list')
|
|
response = api_client.get(url)
|
|
assert response.status_code == 403
|
|
|
|
|
|
@pytest.mark.django_db
|
|
def test_unauthorized_request_notificaton_type(api_client):
|
|
url = reverse('notification-types-list')
|
|
response = api_client.get(url)
|
|
assert response.status_code == 403
|