18
18
from .models import LocatedFile , Location , Nullable
19
19
from .serializers import LocationGeoSerializer
20
20
21
- is_pre_drf_39 = not rest_framework .VERSION .startswith ('3.9' )
22
-
23
21
24
22
class TestRestFrameworkGis (TestCase ):
25
23
def setUp (self ):
@@ -526,7 +524,6 @@ def test_post_geojson_location_list_HTML_web_form_WKT(self):
526
524
location = Location .objects .all ()[0 ]
527
525
self .assertEqual (location .name , "HTML test WKT" )
528
526
529
- @skipIf (is_pre_drf_39 , 'Skip this test if DRF < 3.9' )
530
527
def test_geojson_HTML_widget_value (self ):
531
528
self ._create_locations ()
532
529
response = self .client .get (
@@ -536,16 +533,6 @@ def test_geojson_HTML_widget_value(self):
536
533
self .assertContains (response , '"type": "Point"' )
537
534
self .assertContains (response , '"coordinates": [' )
538
535
539
- @skipIf (not is_pre_drf_39 , 'Skip this test if DRF >= 3.9' )
540
- def test_geojson_HTML_widget_value_pre_drf_39 (self ):
541
- self ._create_locations ()
542
- response = self .client .get (
543
- self .geojson_location_list_url , headers = {"accept" : 'text/html' }
544
- )
545
- self .assertContains (response , '<textarea name="geometry"' )
546
- self .assertContains (response , '"type": "Point"' )
547
- self .assertContains (response , '"coordinates": [' )
548
-
549
536
def test_patch_geojson_location (self ):
550
537
location = Location .objects .create (
551
538
name = 'geojson patch test' , geometry = 'POINT (135.0 45.0)'
0 commit comments