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
8c5649bf
Unverified
Kaydet (Commit)
8c5649bf
authored
May 03, 2019
tarafından
Mariusz Felisiak
Kaydeden (comit)
GitHub
May 03, 2019
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Fixed NonQueryWindowTests.test_unsupported_backend() on MySQL.
üst
e6836136
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
6 deletions
+8
-6
tests.py
tests/expressions_window/tests.py
+8
-6
No files found.
tests/expressions_window/tests.py
Dosyayı görüntüle @
8c5649bf
...
...
@@ -779,6 +779,14 @@ class WindowFunctionTests(TestCase):
)))
class
WindowUnsupportedTests
(
TestCase
):
def
test_unsupported_backend
(
self
):
msg
=
'This backend does not support window expressions.'
with
mock
.
patch
.
object
(
connection
.
features
,
'supports_over_clause'
,
False
):
with
self
.
assertRaisesMessage
(
NotSupportedError
,
msg
):
Employee
.
objects
.
annotate
(
dense_rank
=
Window
(
expression
=
DenseRank
()))
.
get
()
class
NonQueryWindowTests
(
SimpleTestCase
):
def
test_window_repr
(
self
):
self
.
assertEqual
(
...
...
@@ -828,12 +836,6 @@ class NonQueryWindowTests(SimpleTestCase):
with
self
.
assertRaisesMessage
(
NotSupportedError
,
msg
):
Employee
.
objects
.
annotate
(
dense_rank
=
Window
(
expression
=
DenseRank
()))
.
filter
(
dense_rank__gte
=
1
)
def
test_unsupported_backend
(
self
):
msg
=
'This backend does not support window expressions.'
with
mock
.
patch
.
object
(
connection
.
features
,
'supports_over_clause'
,
False
):
with
self
.
assertRaisesMessage
(
NotSupportedError
,
msg
):
Employee
.
objects
.
annotate
(
dense_rank
=
Window
(
expression
=
DenseRank
()))
.
get
()
def
test_invalid_order_by
(
self
):
msg
=
'order_by must be either an Expression or a sequence of expressions'
with
self
.
assertRaisesMessage
(
ValueError
,
msg
):
...
...
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