Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
D
django
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
Batuhan Osman TASKAYA
django
Commits
6e0f1bc0
Kaydet (Commit)
6e0f1bc0
authored
Şub 03, 2014
tarafından
Claude Paroz
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Moved a GoogleMap test
üst
e7e3435b
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
15 deletions
+13
-15
tests.py
django/contrib/gis/tests/geoadmin/tests.py
+1
-15
tests.py
django/contrib/gis/tests/maps/tests.py
+12
-0
No files found.
django/contrib/gis/tests/geoadmin/tests.py
Dosyayı görüntüle @
6e0f1bc0
...
...
@@ -4,7 +4,7 @@ from unittest import skipUnless
from
django.contrib.gis.geos
import
HAS_GEOS
from
django.contrib.gis.tests.utils
import
HAS_SPATIAL_DB
from
django.test
import
TestCase
,
override_settings
from
django.test
import
TestCase
if
HAS_GEOS
and
HAS_SPATIAL_DB
:
from
django.contrib.gis
import
admin
...
...
@@ -12,8 +12,6 @@ if HAS_GEOS and HAS_SPATIAL_DB:
from
.models
import
City
GOOGLE_MAPS_API_KEY
=
'XXXX'
@skipUnless
(
HAS_GEOS
and
HAS_SPATIAL_DB
,
"Geos and spatial db are required."
)
class
GeoAdminTest
(
TestCase
):
...
...
@@ -59,15 +57,3 @@ class GeoAdminTest(TestCase):
self
.
assertFalse
(
has_changed
(
initial
,
data_same
))
self
.
assertFalse
(
has_changed
(
initial
,
data_almost_same
))
self
.
assertTrue
(
has_changed
(
initial
,
data_changed
))
@override_settings
(
GOOGLE_MAPS_API_KEY
=
GOOGLE_MAPS_API_KEY
)
def
test_google_map_scripts
(
self
):
"""
Testing GoogleMap.scripts() output. See #20773.
"""
from
django.contrib.gis.maps.google.gmap
import
GoogleMap
google_map
=
GoogleMap
()
scripts
=
google_map
.
scripts
self
.
assertIn
(
GOOGLE_MAPS_API_KEY
,
scripts
)
self
.
assertIn
(
"new GMap2"
,
scripts
)
django/contrib/gis/tests/maps/tests.py
Dosyayı görüntüle @
6e0f1bc0
...
...
@@ -13,6 +13,18 @@ GOOGLE_MAPS_API_KEY = 'XXXX'
@skipUnless
(
HAS_GEOS
,
'Geos is required.'
)
class
GoogleMapsTest
(
TestCase
):
@override_settings
(
GOOGLE_MAPS_API_KEY
=
GOOGLE_MAPS_API_KEY
)
def
test_google_map_scripts
(
self
):
"""
Testing GoogleMap.scripts() output. See #20773.
"""
from
django.contrib.gis.maps.google.gmap
import
GoogleMap
google_map
=
GoogleMap
()
scripts
=
google_map
.
scripts
self
.
assertIn
(
GOOGLE_MAPS_API_KEY
,
scripts
)
self
.
assertIn
(
"new GMap2"
,
scripts
)
@override_settings
(
GOOGLE_MAPS_API_KEY
=
GOOGLE_MAPS_API_KEY
)
def
test_unicode_in_google_maps
(
self
):
"""
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment