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
e6c0020d
Kaydet (Commit)
e6c0020d
authored
Eyl 22, 2013
tarafından
Aymeric Augustin
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Translated a test to English for consistency.
Also fixed a typo.
üst
2ca00faa
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
3 deletions
+3
-3
tests.py
tests/get_or_create/tests.py
+1
-1
tests.py
tests/transactions/tests.py
+2
-2
No files found.
tests/get_or_create/tests.py
Dosyayı görüntüle @
e6c0020d
...
...
@@ -177,7 +177,7 @@ class UpdateOrCreateTests(TestCase):
self
.
assertRaises
(
IntegrityError
,
Person
.
objects
.
update_or_create
,
first_name
=
"Tom"
,
last_name
=
"Smith"
)
def
test_man
an
ual_primary_key_test
(
self
):
def
test_manual_primary_key_test
(
self
):
# If you specify an existing primary key, but different other fields,
# then you will get an error and data will not be updated.
ManualPrimaryKeyTest
.
objects
.
create
(
id
=
1
,
data
=
"Original"
)
...
...
tests/transactions/tests.py
Dosyayı görüntüle @
e6c0020d
...
...
@@ -265,7 +265,7 @@ class AtomicMergeTests(TransactionTestCase):
Reporter
.
objects
.
create
(
first_name
=
"Archibald"
,
last_name
=
"Haddock"
)
with
six
.
assertRaisesRegex
(
self
,
Exception
,
"Oops"
):
with
transaction
.
atomic
(
savepoint
=
False
):
Reporter
.
objects
.
create
(
first_name
=
"
Tournesol
"
)
Reporter
.
objects
.
create
(
first_name
=
"
Calculus
"
)
raise
Exception
(
"Oops, that's his last name"
)
# It wasn't possible to roll back
self
.
assertEqual
(
Reporter
.
objects
.
count
(),
3
)
...
...
@@ -281,7 +281,7 @@ class AtomicMergeTests(TransactionTestCase):
Reporter
.
objects
.
create
(
first_name
=
"Archibald"
,
last_name
=
"Haddock"
)
with
six
.
assertRaisesRegex
(
self
,
Exception
,
"Oops"
):
with
transaction
.
atomic
(
savepoint
=
False
):
Reporter
.
objects
.
create
(
first_name
=
"
Tournesol
"
)
Reporter
.
objects
.
create
(
first_name
=
"
Calculus
"
)
raise
Exception
(
"Oops, that's his last name"
)
# It wasn't possible to roll back
self
.
assertEqual
(
Reporter
.
objects
.
count
(),
3
)
...
...
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