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
dc811cf5
Kaydet (Commit)
dc811cf5
authored
Şub 24, 2017
tarafından
Mariusz Felisiak
Kaydeden (comit)
Tim Graham
Şub 24, 2017
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Refs #22144 -- Added test for QuerySet.bulk_create() with long non-ASCII text.
üst
c31e7ab5
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
0 deletions
+11
-0
models.py
tests/bulk_create/models.py
+1
-0
tests.py
tests/bulk_create/tests.py
+10
-0
No files found.
tests/bulk_create/models.py
Dosyayı görüntüle @
dc811cf5
...
...
@@ -14,6 +14,7 @@ except ImportError:
class
Country
(
models
.
Model
):
name
=
models
.
CharField
(
max_length
=
255
)
iso_two_letter
=
models
.
CharField
(
max_length
=
2
)
description
=
models
.
TextField
()
class
ProxyCountry
(
Country
):
...
...
tests/bulk_create/tests.py
Dosyayı görüntüle @
dc811cf5
...
...
@@ -39,6 +39,16 @@ class BulkCreateTests(TestCase):
with
self
.
assertNumQueries
(
1
):
Country
.
objects
.
bulk_create
(
self
.
data
)
@skipUnlessDBFeature
(
'has_bulk_insert'
)
def
test_long_non_ascii_text
(
self
):
"""
Inserting non-ASCII values with a length in the range 2001 to 4000
characters, i.e. 4002 to 8000 bytes, must be set as a CLOB on Oracle
(#22144).
"""
Country
.
objects
.
bulk_create
([
Country
(
description
=
'Ж'
*
3000
)])
self
.
assertEqual
(
Country
.
objects
.
count
(),
1
)
def
test_multi_table_inheritance_unsupported
(
self
):
expected_message
=
"Can't bulk create a multi-table inherited model"
with
self
.
assertRaisesMessage
(
ValueError
,
expected_message
):
...
...
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