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
58de495c
Kaydet (Commit)
58de495c
authored
Haz 07, 2014
tarafından
Aymeric Augustin
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Fixed #17427 -- Removed dubious definition of connections equality.
üst
d98cc41a
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
3 additions
and
47 deletions
+3
-47
__init__.py
django/db/backends/__init__.py
+0
-11
1.8.txt
docs/releases/1.8.txt
+3
-0
__init__.py
tests/db_backends/__init__.py
+0
-0
tests.py
tests/db_backends/tests.py
+0
-36
No files found.
django/db/backends/__init__.py
Dosyayı görüntüle @
58de495c
...
...
@@ -73,17 +73,6 @@ class BaseDatabaseWrapper(object):
self
.
allow_thread_sharing
=
allow_thread_sharing
self
.
_thread_ident
=
thread
.
get_ident
()
def
__eq__
(
self
,
other
):
if
isinstance
(
other
,
BaseDatabaseWrapper
):
return
self
.
alias
==
other
.
alias
return
NotImplemented
def
__ne__
(
self
,
other
):
return
not
self
==
other
def
__hash__
(
self
):
return
hash
(
self
.
alias
)
@property
def
queries
(
self
):
if
len
(
self
.
queries_log
)
==
self
.
queries_log
.
maxlen
:
...
...
docs/releases/1.8.txt
Dosyayı görüntüle @
58de495c
...
...
@@ -270,6 +270,9 @@ Miscellaneous
* ``connections.queries`` is now a read-only attribute.
* Database connections are considered equal only if they're the same object.
They aren't hashable any more.
* ``URLField.to_python`` no longer adds a trailing slash to pathless URLs.
* ``django.contrib.gis`` dropped support for GEOS 3.1 and GDAL 1.6.
...
...
tests/db_backends/__init__.py
deleted
100644 → 0
Dosyayı görüntüle @
d98cc41a
tests/db_backends/tests.py
deleted
100644 → 0
Dosyayı görüntüle @
d98cc41a
from
django.test
import
TestCase
from
django.db.backends
import
BaseDatabaseWrapper
class
DummyDatabaseWrapper
(
BaseDatabaseWrapper
):
pass
class
DummyObject
(
object
):
alias
=
None
class
DbBackendTests
(
TestCase
):
def
test_compare_db_wrapper_with_another_object
(
self
):
wrapper
=
BaseDatabaseWrapper
({})
self
.
assertFalse
(
wrapper
==
'not-a-db-wrapper'
)
def
test_compare_db_wrapper_with_another_object_with_alias
(
self
):
wrapper
=
BaseDatabaseWrapper
({})
obj
=
DummyObject
()
obj
.
alias
=
wrapper
.
alias
=
'foobar'
self
.
assertFalse
(
wrapper
==
obj
)
def
test_negate_compare_db_wrapper_with_another_object
(
self
):
wrapper
=
BaseDatabaseWrapper
({})
self
.
assertTrue
(
wrapper
!=
'not-a-db-wrapper'
)
def
test_compare_db_wrappers
(
self
):
wrapper1
=
DummyDatabaseWrapper
({})
wrapper2
=
BaseDatabaseWrapper
({})
wrapper1
.
alias
=
wrapper2
.
alias
=
'foo'
self
.
assertTrue
(
wrapper1
==
wrapper2
)
wrapper1
.
alias
=
'bar'
self
.
assertFalse
(
wrapper1
==
wrapper2
)
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