1
0
mirror of https://github.com/django/django.git synced 2025-03-25 00:30:45 +00:00
Tim Graham a2975cb083 [1.11.x] Fixed #28040 -- Updated SplitArrayWidget to use template-based widget rendering.
Thanks Preston Timmons for review.

Backport of 1ebd295082bb0e6b230cf3bc39fd04bee71c2bd7 from master
2017-04-29 22:24:29 -04:00

26 lines
902 B
Python

import unittest
from forms_tests.widget_tests.base import WidgetTest
from django.db import connection
from django.db.backends.signals import connection_created
from django.test import TestCase, modify_settings
@unittest.skipUnless(connection.vendor == 'postgresql', "PostgreSQL specific tests")
class PostgreSQLTestCase(TestCase):
@classmethod
def tearDownClass(cls):
# No need to keep that signal overhead for non PostgreSQL-related tests.
from django.contrib.postgres.signals import register_hstore_handler
connection_created.disconnect(register_hstore_handler)
super(PostgreSQLTestCase, cls).tearDownClass()
@unittest.skipUnless(connection.vendor == 'postgresql', "PostgreSQL specific tests")
# To locate the widget's template.
@modify_settings(INSTALLED_APPS={'append': 'django.contrib.postgres'})
class PostgreSQLWidgetTestCase(WidgetTest):
pass