2011-10-18 02:45:22 +08:00
|
|
|
from __future__ import absolute_import
|
|
|
|
|
2011-09-10 11:04:30 +08:00
|
|
|
from django.test import TestCase
|
|
|
|
from django.contrib.gis import admin
|
2011-10-18 02:45:22 +08:00
|
|
|
|
|
|
|
from .models import City
|
|
|
|
|
2011-09-10 11:04:30 +08:00
|
|
|
|
|
|
|
class GeoAdminTest(TestCase):
|
|
|
|
urls = 'django.contrib.gis.tests.geoadmin.urls'
|
|
|
|
|
|
|
|
def test01_ensure_geographic_media(self):
|
|
|
|
geoadmin = admin.site._registry[City]
|
|
|
|
admin_js = geoadmin.media.render_js()
|
|
|
|
self.assertTrue(any([geoadmin.openlayers_url in js for js in admin_js]))
|
2011-10-18 02:45:22 +08:00
|
|
|
|