Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[deps] Update djangorestframework requirement from <3.15,>=3.12 to >=3.12,<3.16 #305

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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