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
97bb48d9
Kaydet (Commit)
97bb48d9
authored
Mar 26, 2015
tarafından
Jon Dufresne
Kaydeden (comit)
Tim Graham
Nis 15, 2015
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Fixed model_fields tests to use django TestCase.
üst
28e89783
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
4 deletions
+5
-4
tests.py
tests/model_fields/tests.py
+5
-4
No files found.
tests/model_fields/tests.py
Dosyayı görüntüle @
97bb48d9
...
@@ -245,7 +245,7 @@ class ManyToManyFieldTests(test.TestCase):
...
@@ -245,7 +245,7 @@ class ManyToManyFieldTests(test.TestCase):
)
)
class
DateTimeFieldTests
(
unit
test
.
TestCase
):
class
DateTimeFieldTests
(
test
.
TestCase
):
def
test_datetimefield_to_python_usecs
(
self
):
def
test_datetimefield_to_python_usecs
(
self
):
"""DateTimeField.to_python should support usecs"""
"""DateTimeField.to_python should support usecs"""
f
=
models
.
DateTimeField
()
f
=
models
.
DateTimeField
()
...
@@ -275,7 +275,7 @@ class DateTimeFieldTests(unittest.TestCase):
...
@@ -275,7 +275,7 @@ class DateTimeFieldTests(unittest.TestCase):
self
.
assertEqual
(
obj
.
t
,
tim
)
self
.
assertEqual
(
obj
.
t
,
tim
)
class
BooleanFieldTests
(
unit
test
.
TestCase
):
class
BooleanFieldTests
(
test
.
TestCase
):
def
_test_get_db_prep_lookup
(
self
,
f
):
def
_test_get_db_prep_lookup
(
self
,
f
):
self
.
assertEqual
(
f
.
get_db_prep_lookup
(
'exact'
,
True
,
connection
=
connection
),
[
True
])
self
.
assertEqual
(
f
.
get_db_prep_lookup
(
'exact'
,
True
,
connection
=
connection
),
[
True
])
self
.
assertEqual
(
f
.
get_db_prep_lookup
(
'exact'
,
'1'
,
connection
=
connection
),
[
True
])
self
.
assertEqual
(
f
.
get_db_prep_lookup
(
'exact'
,
'1'
,
connection
=
connection
),
[
True
])
...
@@ -414,8 +414,9 @@ class BooleanFieldTests(unittest.TestCase):
...
@@ -414,8 +414,9 @@ class BooleanFieldTests(unittest.TestCase):
self
.
assertFalse
(
boolean_field
.
has_default
())
self
.
assertFalse
(
boolean_field
.
has_default
())
b
=
BooleanModel
()
b
=
BooleanModel
()
self
.
assertIsNone
(
b
.
bfield
)
self
.
assertIsNone
(
b
.
bfield
)
with
self
.
assertRaises
(
IntegrityError
):
with
transaction
.
atomic
():
b
.
save
()
with
self
.
assertRaises
(
IntegrityError
):
b
.
save
()
finally
:
finally
:
boolean_field
.
default
=
old_default
boolean_field
.
default
=
old_default
...
...
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