Skip to content

Commit

Permalink
[deps] Allow djangorestframework up to 3.15.x
Browse files Browse the repository at this point in the history
Updates the requirements on [djangorestframework](https://github.com/encode/django-rest-framework) to permit the latest version.
- [Release notes](https://github.com/encode/django-rest-framework/releases)
- [Commits](encode/django-rest-framework@3.12.0...3.15.2)

---
updated-dependencies:
- dependency-name: djangorestframework
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Gagan Deep <pandafy.dev@gmail.com>
  • Loading branch information
dependabot[bot] and pandafy authored Aug 17, 2024
1 parent 3449785 commit 533567a
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 21 deletions.
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
platforms=['Platform Indipendent'],
keywords=['django', 'rest-framework', 'gis', 'geojson'],
packages=find_packages(exclude=['tests', 'tests.*']),
install_requires=['djangorestframework>=3.12,<3.15', 'django-filter>=23.5,<25.0'],
install_requires=['djangorestframework>=3.12,<3.16', 'django-filter>=23.5,<25.0'],
classifiers=[
'Development Status :: 4 - Beta',
'Environment :: Web Environment',
Expand Down
42 changes: 22 additions & 20 deletions tests/django_restframework_gis_tests/test_schema_generation.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
from django.test import RequestFactory, TestCase
from packaging.version import parse as parse_version
from rest_framework import VERSION as DRF_VERSION
from rest_framework.generics import RetrieveAPIView
from rest_framework.request import Request
from rest_framework.schemas.openapi import SchemaGenerator
Expand Down Expand Up @@ -489,28 +491,28 @@ def test_geo_json_pagination_schema(self):
)
self.assertIn("features", generated_schema["properties"])
generated_schema["properties"].pop("features")
self.assertDictEqual(
generated_schema,
{
"type": "object",
"properties": {
"type": {"type": "string", "enum": ["FeatureCollection"]},
"count": {"type": "integer", "example": 123},
"next": {
"type": "string",
"nullable": True,
"format": "uri",
"example": "http://api.example.org/accounts/?page=4",
},
"previous": {
"type": "string",
"nullable": True,
"format": "uri",
"example": "http://api.example.org/accounts/?page=2",
},
expected_schema = {
"type": "object",
"properties": {
"type": {"type": "string", "enum": ["FeatureCollection"]},
"count": {"type": "integer", "example": 123},
"next": {
"type": "string",
"nullable": True,
"format": "uri",
"example": "http://api.example.org/accounts/?page=4",
},
"previous": {
"type": "string",
"nullable": True,
"format": "uri",
"example": "http://api.example.org/accounts/?page=2",
},
},
)
}
if parse_version(DRF_VERSION) >= parse_version('3.15'):
expected_schema['required'] = ['count', 'results']
self.assertDictEqual(generated_schema, expected_schema)


class TestRestFrameworkGisFiltersSchema(TestCase):
Expand Down

0 comments on commit 533567a

Please sign in to comment.