mirror of
https://github.com/Nebucatnetzer/network_inventory.git
synced 2024-06-26 00:59:10 +02:00
add tests for nets rest api
This commit is contained in:
parent
2e28f2bca1
commit
a4e5d44dcb
18
backend/nets/tests/test_nets_views.py
Normal file
18
backend/nets/tests/test_nets_views.py
Normal 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
|
||||||
|
|
Loading…
Reference in New Issue
Block a user