add tests for nets rest api

This commit is contained in:
Andreas Zweili 2020-11-30 18:08:55 +01:00
parent 2e28f2bca1
commit a4e5d44dcb
1 changed files with 18 additions and 0 deletions

View File

@ -0,0 +1,18 @@
import pytest
from django.urls import reverse
@pytest.mark.django_db
def test_unauthorized_request_ip_status(api_client):
url = reverse('ip-status-list')
response = api_client.get(url)
assert response.status_code == 403
@pytest.mark.django_db
def test_unauthorized_request_net(api_client):
url = reverse('net-list')
response = api_client.get(url)
assert response.status_code == 403