This commit is contained in:
parent
0cdbc3e4a2
commit
b940f1f0ca
4 changed files with 33 additions and 6 deletions
21
backend/toolshed/tests/test_docs.py
Normal file
21
backend/toolshed/tests/test_docs.py
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
from django.test import Client
|
||||
from authentication.tests import UserTestMixin, SignatureAuthClient, ToolshedTestCase
|
||||
from backend import settings
|
||||
from toolshed.tests import CategoryTestMixin, TagTestMixin, PropertyTestMixin
|
||||
|
||||
anonymous_client = Client()
|
||||
client = SignatureAuthClient()
|
||||
|
||||
|
||||
class OpenapiTestCase(UserTestMixin, CategoryTestMixin, TagTestMixin, PropertyTestMixin, ToolshedTestCase):
|
||||
|
||||
def setUp(self):
|
||||
super().setUp()
|
||||
self.prepare_users()
|
||||
|
||||
def test_docs_anonymous(self):
|
||||
response = anonymous_client.get('/docs/?format=openapi')
|
||||
self.assertEqual(response.status_code, 200)
|
||||
self.assertTrue('swagger' in response.json())
|
||||
self.assertTrue('info' in response.json())
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue