summaryrefslogtreecommitdiff
path: root/tests/postgres_tests/__init__.py
diff options
context:
space:
mode:
authorTim Graham <timograham@gmail.com>2017-05-15 09:26:38 -0400
committerGitHub <noreply@github.com>2017-05-15 09:26:38 -0400
commit650bf6714d5648811a8bc08ce53b7fa86cc38d40 (patch)
treee65828cfbf44b4e813e089bd2590981a4080c809 /tests/postgres_tests/__init__.py
parentf0d47ab3b6aef90480460fc3c96453d1bb47532a (diff)
Refs #27996 -- Skipped RandomUUID test on PostgreSQL 9.3.
Diffstat (limited to 'tests/postgres_tests/__init__.py')
-rw-r--r--tests/postgres_tests/__init__.py10
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/postgres_tests/__init__.py b/tests/postgres_tests/__init__.py
index 24d78c9bfe..ea6b96aff9 100644
--- a/tests/postgres_tests/__init__.py
+++ b/tests/postgres_tests/__init__.py
@@ -7,6 +7,16 @@ from django.db.backends.signals import connection_created
from django.test import TestCase, modify_settings
+def skipUnlessPG94(test):
+ try:
+ PG_VERSION = connection.pg_version
+ except AttributeError:
+ PG_VERSION = 0
+ if PG_VERSION < 90400:
+ return unittest.skip('PostgreSQL ≥ 9.4 required')(test)
+ return test
+
+
@unittest.skipUnless(connection.vendor == 'postgresql', "PostgreSQL specific tests")
class PostgreSQLTestCase(TestCase):
@classmethod