mirror of
https://github.com/cookiecutter/cookiecutter-django.git
synced 2025-02-03 05:04:25 +03:00
Rename API docs tests to not mention Swagger
This commit is contained in:
parent
683f207d4a
commit
0434aea33f
|
@ -4,14 +4,14 @@ import pytest
|
||||||
from django.urls import reverse
|
from django.urls import reverse
|
||||||
|
|
||||||
|
|
||||||
def test_swagger_accessible_by_admin(admin_client):
|
def test_api_docs_accessible_by_admin(admin_client):
|
||||||
url = reverse("api-docs")
|
url = reverse("api-docs")
|
||||||
response = admin_client.get(url)
|
response = admin_client.get(url)
|
||||||
assert response.status_code == HTTPStatus.OK
|
assert response.status_code == HTTPStatus.OK
|
||||||
|
|
||||||
|
|
||||||
@pytest.mark.django_db
|
@pytest.mark.django_db
|
||||||
def test_swagger_ui_not_accessible_by_normal_user(client):
|
def test_api_docs_not_accessible_by_anonymous_users(client):
|
||||||
url = reverse("api-docs")
|
url = reverse("api-docs")
|
||||||
response = client.get(url)
|
response = client.get(url)
|
||||||
assert response.status_code == HTTPStatus.FORBIDDEN
|
assert response.status_code == HTTPStatus.FORBIDDEN
|
Loading…
Reference in New Issue
Block a user