Skip to content

Commit 191209b

Browse files
committed
[qa] Format code
1 parent 1d57899 commit 191209b

File tree

3 files changed

+26
-10
lines changed

3 files changed

+26
-10
lines changed

tests/django_restframework_gis_tests/serializers.py

+6-2
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,9 @@ class Meta:
140140
exclude = []
141141

142142

143-
class LocationGeoFeatureMethodAutoBboxSerializer(gis_serializers.GeoFeatureModelSerializer):
143+
class LocationGeoFeatureMethodAutoBboxSerializer(
144+
gis_serializers.GeoFeatureModelSerializer
145+
):
144146
new_geometry = gis_serializers.GeometrySerializerMethodField()
145147

146148
class Meta:
@@ -153,7 +155,9 @@ def get_new_geometry(self, obj):
153155
return obj.geometry
154156

155157

156-
class LocationGeoFeatureMethodManualBboxSerializer(gis_serializers.GeoFeatureModelSerializer):
158+
class LocationGeoFeatureMethodManualBboxSerializer(
159+
gis_serializers.GeoFeatureModelSerializer
160+
):
157161
new_geometry = gis_serializers.GeometrySerializerMethodField()
158162

159163
class Meta:

tests/django_restframework_gis_tests/test_bbox.py

+13-5
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,12 @@ class TestRestFrameworkGisBBox(TestCase):
2222
def setUp(self):
2323
self.geojson_boxedlocation_list_url = reverse('api_geojson_boxedlocation_list')
2424
self.geojson_location_bbox_list_url = reverse('api_geojson_location_bbox_list')
25-
self.geojson_location_method_field_auto_bbox_list_url = reverse('api_geojson_location_method_field_auto_bbox_list')
26-
self.geojson_location_method_field_manual_bbox_list_url = reverse('api_geojson_location_method_field_manual_bbox_list')
25+
self.geojson_location_method_field_auto_bbox_list_url = reverse(
26+
'api_geojson_location_method_field_auto_bbox_list'
27+
)
28+
self.geojson_location_method_field_manual_bbox_list_url = reverse(
29+
'api_geojson_location_method_field_manual_bbox_list'
30+
)
2731

2832
def _create_locations(self):
2933
self.bl1 = BoxedLocation.objects.create(
@@ -91,14 +95,18 @@ def test_get_autogenerated_location_bbox_geojson(self):
9195

9296
def test_get_autogenerated_location_auto_bbox_geojson_with_method_field(self):
9397
self._create_locations()
94-
response = self.client.get(self.geojson_location_method_field_auto_bbox_list_url)
98+
response = self.client.get(
99+
self.geojson_location_method_field_auto_bbox_list_url
100+
)
95101
self.assertEqual(response.status_code, 200)
96102
self.assertEqual(len(response.data['features']), 1)
97103
self.assertEqual(response.data['features'][0]['bbox'], self.l1.geometry.extent)
98-
104+
99105
def test_get_autogenerated_location_manual_bbox_geojson_with_method_field(self):
100106
self._create_locations()
101-
response = self.client.get(self.geojson_location_method_field_manual_bbox_list_url)
107+
response = self.client.get(
108+
self.geojson_location_method_field_manual_bbox_list_url
109+
)
102110
self.assertEqual(response.status_code, 200)
103111
self.assertEqual(len(response.data['features']), 1)
104112
self.assertEqual(response.data['features'][0]['bbox'], self.l1.geometry.extent)

tests/django_restframework_gis_tests/views.py

+7-3
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,9 @@
1717
LocatedFileGeoFeatureSerializer,
1818
LocationGeoFeatureBboxSerializer,
1919
LocationGeoFeatureFalseIdSerializer,
20-
LocationGeoFeatureMethodSerializer,
2120
LocationGeoFeatureMethodAutoBboxSerializer,
2221
LocationGeoFeatureMethodManualBboxSerializer,
22+
LocationGeoFeatureMethodSerializer,
2323
LocationGeoFeatureNoIdSerializer,
2424
LocationGeoFeatureSerializer,
2525
LocationGeoFeatureSlugSerializer,
@@ -248,7 +248,9 @@ class GeojsonLocationMethodFieldAutoBboxList(generics.ListCreateAPIView):
248248
queryset = Location.objects.all()
249249

250250

251-
geojson_location_method_field_auto_bbox_list = GeojsonLocationMethodFieldAutoBboxList.as_view()
251+
geojson_location_method_field_auto_bbox_list = (
252+
GeojsonLocationMethodFieldAutoBboxList.as_view()
253+
)
252254

253255

254256
class GeojsonLocationMethodFieldManualBboxList(generics.ListCreateAPIView):
@@ -257,7 +259,9 @@ class GeojsonLocationMethodFieldManualBboxList(generics.ListCreateAPIView):
257259
queryset = Location.objects.all()
258260

259261

260-
geojson_location_method_field_manual_bbox_list = GeojsonLocationMethodFieldManualBboxList.as_view()
262+
geojson_location_method_field_manual_bbox_list = (
263+
GeojsonLocationMethodFieldManualBboxList.as_view()
264+
)
261265

262266

263267
class GeojsonNullableDetails(generics.RetrieveUpdateDestroyAPIView):

0 commit comments

Comments
 (0)