diff options
| author | Tim Graham <timograham@gmail.com> | 2015-03-28 09:39:09 -0400 |
|---|---|---|
| committer | Tim Graham <timograham@gmail.com> | 2015-03-28 09:39:49 -0400 |
| commit | c0102dc7fff77555053b79c03205f6bfba64c156 (patch) | |
| tree | 827438597163697b3ac44af02fa25c5da3476b6d | |
| parent | a70dea2c06cf834e24c4b63237af669c143a8e03 (diff) | |
[1.8.x] Fixed skipping of gis_tests when dependencies not installed.
Backport of ba1665ed75264e57b7bc6cd7606e072ad3050a3b from master
| -rw-r--r-- | tests/gis_tests/maps/tests.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/tests/gis_tests/maps/tests.py b/tests/gis_tests/maps/tests.py index 991109af5c..3bcd38e485 100644 --- a/tests/gis_tests/maps/tests.py +++ b/tests/gis_tests/maps/tests.py @@ -4,7 +4,6 @@ from __future__ import unicode_literals from unittest import skipUnless from django.contrib.gis.geos import HAS_GEOS -from django.contrib.gis.maps.google.overlays import GEvent, GOverlayBase from django.test import TestCase from django.test.utils import modify_settings, override_settings from django.utils.encoding import force_text @@ -45,11 +44,13 @@ class GoogleMapsTest(TestCase): self.assertIn("En français", google_map.scripts) def test_gevent_html_safe(self): + from django.contrib.gis.maps.google.overlays import GEvent event = GEvent('click', 'function() {location.href = "http://www.google.com"}') self.assertTrue(hasattr(GEvent, '__html__')) self.assertEqual(force_text(event), event.__html__()) def test_goverlay_html_safe(self): + from django.contrib.gis.maps.google.overlays import GOverlayBase overlay = GOverlayBase() overlay.js_params = '"foo", "bar"' self.assertTrue(hasattr(GOverlayBase, '__html__')) |
