Skip to content

Commit

Permalink
[chores] Updated drf-yasg dependency to also install coreapi openwisp…
Browse files Browse the repository at this point in the history
…#341

- Added test for swagger docs

Related to openwisp#341
  • Loading branch information
pandafy authored Jun 26, 2023
1 parent d9f4571 commit 9d3cb2e
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 1 deletion.
8 changes: 7 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,13 @@
'rest': [
'djangorestframework~=3.14.0',
'django-filter~=23.2', # django-filter uses CalVer
'drf-yasg~=1.21.0',
# The coreapi package is archived and all packages
# are moving away from coreapi (e.g. DRF, django-filter, drf-yasg).
# There's already an open PR in drf-yasg
# https://github.com/axnsan12/drf-yasg/pull/857.
# TODO: Before releasing, check if newer version
# of drf-yasg is available.
'drf-yasg[coreapi]~=1.21.0',
],
'celery': ['celery~=5.3.0'],
'selenium': ['selenium~=4.10.0'],
Expand Down
10 changes: 10 additions & 0 deletions tests/test_project/tests/test_integrations.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
from django.test import TestCase
from django.urls import reverse

from . import AdminTestMixin


class TestIntegrations(AdminTestMixin, TestCase):
def test_swagger_api_docs(self):
response = self.client.get(reverse('schema-swagger-ui'), {'format': 'openapi'})
self.assertEqual(response.status_code, 200)

0 comments on commit 9d3cb2e

Please sign in to comment.