@@ -285,10 +285,7 @@ def test_geojson_format(self):
285285 'geometry' : {'type' : 'Point' , 'coordinates' : [135.0 , 45.0 ]},
286286 }
287287 response = self .client .get (url )
288- if sys .version_info > (3 , 0 , 0 ):
289- self .assertCountEqual (json .dumps (response .data ), json .dumps (expected ))
290- else :
291- self .assertItemsEqual (json .dumps (response .data ), json .dumps (expected ))
288+ self .assertCountEqual (json .dumps (response .data ), json .dumps (expected ))
292289 response = self .client .get (url , headers = {"accept" : 'text/html' })
293290 self .assertContains (response , "Kool geojson test" )
294291
@@ -550,10 +547,6 @@ def test_geojson_HTML_widget_value_pre_drf_39(self):
550547 self .assertContains (response , '<textarea name="geometry"' )
551548 self .assertContains (response , '"type": "Point"' )
552549 self .assertContains (response , '"coordinates": [' )
553- # TODO: remove this when python 2 will be deprecated
554- self .assertNotContains (
555- response , 'u'type': u'Point', u'coordinates':'
556- )
557550
558551 def test_patch_geojson_location (self ):
559552 location = Location .objects .create (
@@ -769,8 +762,5 @@ def test_geometrycollection_geojson(self):
769762 },
770763 }
771764 response = self .client .get (url )
772- if sys .version_info > (3 , 0 , 0 ):
773- self .assertCountEqual (json .dumps (response .data ), json .dumps (expected ))
774- else :
775- self .assertItemsEqual (json .dumps (response .data ), json .dumps (expected ))
765+ self .assertCountEqual (json .dumps (response .data ), json .dumps (expected ))
776766 self .assertContains (response , "Kool geometry collection geojson test" )
0 commit comments