File tree Expand file tree Collapse file tree 2 files changed +44
-28
lines changed Expand file tree Collapse file tree 2 files changed +44
-28
lines changed Original file line number Diff line number Diff line change
1
+ # ---
2
+
3
+ # test_name: test_docs
4
+
5
+ # strict: False
6
+
7
+ # marks:
8
+ # - usefixtures:
9
+ # - django_live_url
10
+
11
+ # stages:
12
+ # - name: signup
13
+ # request:
14
+ # url: "{django_live_url}/user/signup"
15
+ # data:
16
+ # email: test_suites_user@heartex.com
17
+ # password: 12345678
18
+ # method: POST
19
+ # response:
20
+ # status_code: 302
21
+ # - name: get_docs
22
+ # request:
23
+ # url: "{django_live_url}/docs/api?format=openapi"
24
+ # method: GET
25
+ # response:
26
+ # status_code: 200
27
+ # verify_response_with:
28
+ # function: tests.utils:verify_docs
29
+ import pytest
30
+ from organizations .tests .factories import OrganizationFactory
31
+ from rest_framework .test import APIClient
32
+ from tests .utils import verify_docs
33
+
34
+
35
+ @pytest .mark .django_db
36
+ def test_docs ():
37
+ organization = OrganizationFactory ()
38
+ user = organization .created_by
39
+ client = APIClient ()
40
+ client .force_authenticate (user )
41
+
42
+ response = client .get ('/docs/api?format=openapi' )
43
+ assert response .status_code == 200
44
+ verify_docs (response )
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments