/
vshmidt
/
label-studio
Обзор
Документация
Войти
/
vshmidt
/
label-studio
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
Аналитика
Безопасность
develop
label_studio/tests/test_docs.py
44 строки
1 KB
Jo Booth
chore: ROOT-52: migration from drf-yasg to Spectacular (#7894)
10 июл 2025, 23:34
Не верифицирован
10 июл 2025, 23:34
de13c3a
Код
Авторство
О чём код?
# --- # test_name: test_docs # strict: False # marks: # - usefixtures: # - django_live_url # stages: # - name: signup # request: # url: "{django_live_url}/user/signup" # data: # email: test_suites_user@heartex.com # password: 12345678 # method: POST # response: # status_code: 302 # - name: get_docs # request: # url: "{django_live_url}/docs/api?format=openapi" # method: GET # response: # status_code: 200 # verify_response_with: # function: tests.utils:verify_docs import pytest from organizations.tests.factories import OrganizationFactory from rest_framework.test import APIClient from tests.utils import verify_docs @pytest.mark.django_db def test_docs(): organization = OrganizationFactory() user = organization.created_by client = APIClient() client.force_authenticate(user) response = client.get('/docs/api?format=openapi', follow=True) assert response.status_code == 200 verify_docs(response)