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
f28c301a
Kaydet (Commit)
f28c301a
authored
Şub 25, 2013
tarafından
Florian Hahn
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Fixed #18176 -- Added test for year lookups with year < 1000
Thanks Tomas Ehrlich for the initial test
üst
6d52bcbb
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
0 deletions
+15
-0
tests.py
tests/regressiontests/model_regress/tests.py
+15
-0
No files found.
tests/regressiontests/model_regress/tests.py
Dosyayı görüntüle @
f28c301a
...
...
@@ -57,6 +57,7 @@ class ModelTests(TestCase):
Party
.
objects
.
create
(
when
=
datetime
.
datetime
(
1999
,
12
,
31
))
Party
.
objects
.
create
(
when
=
datetime
.
datetime
(
1998
,
12
,
31
))
Party
.
objects
.
create
(
when
=
datetime
.
datetime
(
1999
,
1
,
1
))
Party
.
objects
.
create
(
when
=
datetime
.
datetime
(
1
,
3
,
3
))
self
.
assertQuerysetEqual
(
Party
.
objects
.
filter
(
when__month
=
2
),
[]
)
...
...
@@ -104,6 +105,20 @@ class ModelTests(TestCase):
attrgetter
(
"when"
)
)
# Regression test for #18969
self
.
assertQuerysetEqual
(
Party
.
objects
.
filter
(
when__year
=
1
),
[
datetime
.
date
(
1
,
3
,
3
),
],
attrgetter
(
"when"
)
)
self
.
assertQuerysetEqual
(
Party
.
objects
.
filter
(
when__year
=
'1'
),
[
datetime
.
date
(
1
,
3
,
3
),
],
attrgetter
(
"when"
)
)
def
test_date_filter_null
(
self
):
# Date filtering was failing with NULL date values in SQLite
# (regression test for #3501, amongst other things).
...
...
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