summaryrefslogtreecommitdiff
path: root/tests/postgres_tests
diff options
context:
space:
mode:
authorTim Graham <timograham@gmail.com>2015-02-16 18:10:35 -0500
committerTim Graham <timograham@gmail.com>2015-02-17 06:35:17 -0500
commita00a0f880485e1f122e48e0216d34d08efe199e1 (patch)
tree32e3f224efa19f8c08a42a33017626d725e41a79 /tests/postgres_tests
parent730fb593ad19731e7018dd83236318bfe71de86a (diff)
[1.8.x] Fixed #24290 -- Skipped postgres_tests if not running with PostgreSQL.
Backport of 8b39f33d78ce5749f8ca40a7ae6823b5f6c26c09 from master
Diffstat (limited to 'tests/postgres_tests')
-rw-r--r--tests/postgres_tests/test_array.py4
-rw-r--r--tests/postgres_tests/test_hstore.py5
-rw-r--r--tests/postgres_tests/test_ranges.py2
-rw-r--r--tests/postgres_tests/test_unaccent.py4
4 files changed, 0 insertions, 15 deletions
diff --git a/tests/postgres_tests/test_array.py b/tests/postgres_tests/test_array.py
index 770d5a1623..88e34f9ce4 100644
--- a/tests/postgres_tests/test_array.py
+++ b/tests/postgres_tests/test_array.py
@@ -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}]'
diff --git a/tests/postgres_tests/test_hstore.py b/tests/postgres_tests/test_hstore.py
index ac22f322b5..06544163f8 100644
--- a/tests/postgres_tests/test_hstore.py
+++ b/tests/postgres_tests/test_hstore.py
@@ -1,17 +1,14 @@
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}]'
diff --git a/tests/postgres_tests/test_ranges.py b/tests/postgres_tests/test_ranges.py
index c26382a15b..71d3301756 100644
--- a/tests/postgres_tests/test_ranges.py
+++ b/tests/postgres_tests/test_ranges.py
@@ -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)
diff --git a/tests/postgres_tests/test_unaccent.py b/tests/postgres_tests/test_unaccent.py
index 47ccbda519..ba65155301 100644
--- a/tests/postgres_tests/test_unaccent.py
+++ b/tests/postgres_tests/test_unaccent.py
@@ -1,15 +1,11 @@
# -*- 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):