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
c6ea4ed5
Kaydet (Commit)
c6ea4ed5
authored
9 years ago
tarafından
Jaap Roes
Kaydeden (comit)
Tim Graham
9 years ago
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Fixed #25825 -- Implemented __ne__() for template Origin
üst
395af23a
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
27 additions
and
0 deletions
+27
-0
base.py
django/template/base.py
+3
-0
test_origin.py
tests/template_tests/test_origin.py
+24
-0
No files found.
django/template/base.py
Dosyayı görüntüle @
c6ea4ed5
...
...
@@ -151,6 +151,9 @@ class Origin(object):
self
.
loader
==
other
.
loader
)
def
__ne__
(
self
,
other
):
return
not
self
.
__eq__
(
other
)
@property
def
loader_name
(
self
):
if
self
.
loader
:
...
...
This diff is collapsed.
Click to expand it.
tests/template_tests/test_origin.py
0 → 100644
Dosyayı görüntüle @
c6ea4ed5
from
unittest
import
TestCase
from
django.template
import
Engine
from
.utils
import
TEMPLATE_DIR
class
OriginTestCase
(
TestCase
):
def
setUp
(
self
):
self
.
engine
=
Engine
(
dirs
=
[
TEMPLATE_DIR
])
def
test_origin_compares_equal
(
self
):
a
=
self
.
engine
.
get_template
(
'index.html'
)
b
=
self
.
engine
.
get_template
(
'index.html'
)
self
.
assertEqual
(
a
.
origin
,
b
.
origin
)
self
.
assertTrue
(
a
.
origin
==
b
.
origin
)
self
.
assertFalse
(
a
.
origin
!=
b
.
origin
)
def
test_origin_compares_not_equal
(
self
):
a
=
self
.
engine
.
get_template
(
'first/test.html'
)
b
=
self
.
engine
.
get_template
(
'second/test.html'
)
self
.
assertNotEqual
(
a
.
origin
,
b
.
origin
)
self
.
assertFalse
(
a
.
origin
==
b
.
origin
)
self
.
assertTrue
(
a
.
origin
!=
b
.
origin
)
This diff is collapsed.
Click to expand it.
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