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
6b97ae35
Kaydet (Commit)
6b97ae35
authored
Haz 09, 2014
tarafından
Tim Graham
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Added rollback emulation to spatialite backend; refs #22487.
üst
f146e70c
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
1 deletion
+8
-1
creation.py
django/contrib/gis/db/backends/spatialite/creation.py
+8
-1
No files found.
django/contrib/gis/db/backends/spatialite/creation.py
Dosyayı görüntüle @
6b97ae35
...
...
@@ -7,7 +7,7 @@ from django.db.backends.sqlite3.creation import DatabaseCreation
class
SpatiaLiteCreation
(
DatabaseCreation
):
def
create_test_db
(
self
,
verbosity
=
1
,
autoclobber
=
False
,
keepdb
=
False
):
def
create_test_db
(
self
,
verbosity
=
1
,
autoclobber
=
False
,
serialize
=
True
,
keepdb
=
False
):
"""
Creates a test database, prompting the user for confirmation if the
database already exists. Returns the name of the test database created.
...
...
@@ -47,6 +47,13 @@ class SpatiaLiteCreation(DatabaseCreation):
database
=
self
.
connection
.
alias
,
load_initial_data
=
False
)
# We then serialize the current state of the database into a string
# and store it on the connection. This slightly horrific process is so people
# who are testing on databases without transactions or who are using
# a TransactionTestCase still get a clean database on every test run.
if
serialize
:
self
.
connection
.
_test_serialized_contents
=
self
.
serialize_db_to_string
()
# We need to then do a flush to ensure that any data installed by
# custom SQL has been removed. The only test data should come from
# test fixtures, or autogenerated from post_migrate triggers.
...
...
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