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
57f76be3
Kaydet (Commit)
57f76be3
authored
Nis 23, 2016
tarafından
Tim Graham
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Removed a flaky contrib.postgres search test.
The test sometimes fails on CI and isn't worth debugging at this time.
üst
a755e065
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
14 deletions
+1
-14
test_search.py
tests/postgres_tests/test_search.py
+1
-14
No files found.
tests/postgres_tests/test_search.py
Dosyayı görüntüle @
57f76be3
...
@@ -5,15 +5,11 @@ These tests use dialogue from the 1975 film Monty Python and the Holy Grail.
...
@@ -5,15 +5,11 @@ These tests use dialogue from the 1975 film Monty Python and the Holy Grail.
All text copyright Python (Monty) Pictures. Thanks to sacred-texts.com for the
All text copyright Python (Monty) Pictures. Thanks to sacred-texts.com for the
transcript.
transcript.
"""
"""
from
unittest
import
skipIf
from
django.contrib.postgres.search
import
(
from
django.contrib.postgres.search
import
(
SearchQuery
,
SearchRank
,
SearchVector
,
SearchQuery
,
SearchRank
,
SearchVector
,
)
)
from
django.db.models
import
F
from
django.db.models
import
F
from
django.test
import
ignore_warnings
,
modify_settings
from
django.test
import
modify_settings
from
django.utils
import
six
from
django.utils.deprecation
import
RemovedInDjango20Warning
from
.
import
PostgreSQLTestCase
from
.
import
PostgreSQLTestCase
from
.models
import
Character
,
Line
,
Scene
from
.models
import
Character
,
Line
,
Scene
...
@@ -84,15 +80,6 @@ class GrailTestData(object):
...
@@ -84,15 +80,6 @@ class GrailTestData(object):
)
)
class
ContribPostgresNotInstalledTests
(
PostgreSQLTestCase
):
@skipIf
(
six
.
PY2
,
"This test fails occasionally and weirdly on python 2"
)
@ignore_warnings
(
category
=
RemovedInDjango20Warning
)
def
test_search_lookup_missing
(
self
):
msg
=
"Add 'django.contrib.postgres' to settings.INSTALLED_APPS to use the search operator."
with
self
.
assertRaisesMessage
(
NotImplementedError
,
msg
):
list
(
Line
.
objects
.
filter
(
dialogue__search
=
'elbows'
))
@modify_settings
(
INSTALLED_APPS
=
{
'append'
:
'django.contrib.postgres'
})
@modify_settings
(
INSTALLED_APPS
=
{
'append'
:
'django.contrib.postgres'
})
class
SimpleSearchTest
(
GrailTestData
,
PostgreSQLTestCase
):
class
SimpleSearchTest
(
GrailTestData
,
PostgreSQLTestCase
):
...
...
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