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
8b39f33d
Kaydet (Commit)
8b39f33d
authored
Şub 16, 2015
tarafından
Tim Graham
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Fixed #24290 -- Skipped postgres_tests if not running with PostgreSQL.
üst
3adc5f1e
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
6 additions
and
16 deletions
+6
-16
test_array.py
tests/postgres_tests/test_array.py
+0
-4
test_hstore.py
tests/postgres_tests/test_hstore.py
+0
-5
test_ranges.py
tests/postgres_tests/test_ranges.py
+0
-2
test_unaccent.py
tests/postgres_tests/test_unaccent.py
+0
-4
runtests.py
tests/runtests.py
+6
-1
No files found.
tests/postgres_tests/test_array.py
Dosyayı görüntüle @
8b39f33d
...
...
@@ -18,7 +18,6 @@ from .models import (
)
@unittest.skipUnless
(
connection
.
vendor
==
'postgresql'
,
'PostgreSQL required'
)
class
TestSaveLoad
(
TestCase
):
def
test_integer
(
self
):
...
...
@@ -94,7 +93,6 @@ class TestSaveLoad(TestCase):
self
.
assertEqual
(
instance
.
decimals
,
loaded
.
decimals
)
@unittest.skipUnless
(
connection
.
vendor
==
'postgresql'
,
'PostgreSQL required'
)
class
TestQuerying
(
TestCase
):
def
setUp
(
self
):
...
...
@@ -274,7 +272,6 @@ class TestMigrations(TransactionTestCase):
name
,
path
,
args
,
kwargs
=
field
.
deconstruct
()
self
.
assertEqual
(
path
,
'postgres_tests.models.ArrayFieldSubclass'
)
@unittest.skipUnless
(
connection
.
vendor
==
'postgresql'
,
'PostgreSQL required'
)
@override_settings
(
MIGRATION_MODULES
=
{
"postgres_tests"
:
"postgres_tests.array_default_migrations"
,
})
...
...
@@ -291,7 +288,6 @@ class TestMigrations(TransactionTestCase):
self
.
assertNotIn
(
table_name
,
connection
.
introspection
.
table_names
(
cursor
))
@unittest.skipUnless
(
connection
.
vendor
==
'postgresql'
,
'PostgreSQL required'
)
class
TestSerialization
(
TestCase
):
test_data
=
'[{"fields": {"field": "[
\\
"1
\\
",
\\
"2
\\
"]"}, "model": "postgres_tests.integerarraymodel", "pk": null}]'
...
...
tests/postgres_tests/test_hstore.py
Dosyayı görüntüle @
8b39f33d
import
json
import
unittest
from
django.contrib.postgres
import
forms
from
django.contrib.postgres.fields
import
HStoreField
from
django.contrib.postgres.validators
import
KeysValidator
from
django.core
import
exceptions
,
serializers
from
django.db
import
connection
from
django.test
import
TestCase
from
.models
import
HStoreModel
@unittest.skipUnless
(
connection
.
vendor
==
'postgresql'
,
'PostgreSQL required'
)
class
SimpleTests
(
TestCase
):
apps
=
[
'django.contrib.postgres'
]
...
...
@@ -36,7 +33,6 @@ class SimpleTests(TestCase):
self
.
assertEqual
(
reloaded
.
field
,
value
)
@unittest.skipUnless
(
connection
.
vendor
==
'postgresql'
,
'PostgreSQL required'
)
class
TestQuerying
(
TestCase
):
def
setUp
(
self
):
...
...
@@ -115,7 +111,6 @@ class TestQuerying(TestCase):
)
@unittest.skipUnless
(
connection
.
vendor
==
'postgresql'
,
'PostgreSQL required'
)
class
TestSerialization
(
TestCase
):
test_data
=
'[{"fields": {"field": "{
\\
"a
\\
":
\\
"b
\\
"}"}, "model": "postgres_tests.hstoremodel", "pk": null}]'
...
...
tests/postgres_tests/test_ranges.py
Dosyayı görüntüle @
8b39f33d
...
...
@@ -18,8 +18,6 @@ from .models import RangesModel
def
skipUnlessPG92
(
test
):
if
not
connection
.
vendor
==
'postgresql'
:
return
unittest
.
skip
(
'PostgreSQL required'
)(
test
)
PG_VERSION
=
connection
.
pg_version
if
PG_VERSION
<
90200
:
return
unittest
.
skip
(
'PostgreSQL >= 9.2 required'
)(
test
)
...
...
tests/postgres_tests/test_unaccent.py
Dosyayı görüntüle @
8b39f33d
# -*- coding: utf-8 -*-
from
__future__
import
unicode_literals
import
unittest
from
django.db
import
connection
from
django.test
import
TestCase
,
modify_settings
from
.models
import
CharFieldModel
,
TextFieldModel
@unittest.skipUnless
(
connection
.
vendor
==
'postgresql'
,
'PostgreSQL required'
)
@modify_settings
(
INSTALLED_APPS
=
{
'append'
:
'django.contrib.postgres'
})
class
UnaccentTest
(
TestCase
):
...
...
tests/runtests.py
Dosyayı görüntüle @
8b39f33d
...
...
@@ -84,7 +84,7 @@ def get_test_modules():
os
.
path
.
isfile
(
f
)
or
not
os
.
path
.
exists
(
os
.
path
.
join
(
dirpath
,
f
,
'__init__.py'
))):
continue
if
not
connection
.
vendor
==
'postgresql'
and
f
==
'postgres_tests'
or
f
==
'postgre
s'
:
if
connection
.
vendor
!=
'postgresql'
and
f
==
'postgres_test
s'
:
continue
modules
.
append
((
modpath
,
f
))
return
modules
...
...
@@ -230,6 +230,11 @@ def django_tests(verbosity, interactive, failfast, keepdb, reverse, test_labels,
state
=
setup
(
verbosity
,
test_labels
)
extra_tests
=
[]
if
test_labels
and
'postgres_tests'
in
test_labels
and
connection
.
vendor
!=
'postgres'
:
if
verbosity
>=
2
:
print
(
"Removed postgres_tests from tests as we're not running with PostgreSQL."
)
test_labels
.
remove
(
'postgres_tests'
)
# Run the test suite, including the extra validation tests.
if
not
hasattr
(
settings
,
'TEST_RUNNER'
):
settings
.
TEST_RUNNER
=
'django.test.runner.DiscoverRunner'
...
...
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