From d3209bf09cb91f95292efce3ec2b29d89235f501 Mon Sep 17 00:00:00 2001 From: Tim Graham Date: Fri, 12 May 2017 09:47:40 -0400 Subject: [PATCH] Simplified test for OSMWidget.default_lon/lat. --- tests/gis_tests/test_geoforms.py | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/tests/gis_tests/test_geoforms.py b/tests/gis_tests/test_geoforms.py index c08ef308aa..10f9d8f89b 100644 --- a/tests/gis_tests/test_geoforms.py +++ b/tests/gis_tests/test_geoforms.py @@ -326,6 +326,9 @@ class OSMWidgetTest(SimpleTestCase): self.assertIn("id: 'id_p',", rendered) def test_default_lat_lon(self): + self.assertEqual(forms.OSMWidget.default_lon, 5) + self.assertEqual(forms.OSMWidget.default_lat, 47) + class PointForm(forms.Form): p = forms.PointField( widget=forms.OSMWidget(attrs={ @@ -338,14 +341,6 @@ class OSMWidgetTest(SimpleTestCase): self.assertIn("options['default_lon'] = 20;", rendered) self.assertIn("options['default_lat'] = 30;", rendered) - if forms.OSMWidget.default_lon != 20: - self.assertNotIn( - "options['default_lon'] = %d;" % forms.OSMWidget.default_lon, - rendered) - if forms.OSMWidget.default_lat != 30: - self.assertNotIn( - "options['default_lat'] = %d;" % forms.OSMWidget.default_lat, - rendered) class GeometryWidgetTests(SimpleTestCase):