__init__.py 984 B

123456789101112131415161718192021222324252627
  1. import unittest
  2. from forms_tests.widget_tests.base import WidgetTest
  3. from django.db import connection
  4. from django.test import SimpleTestCase, TestCase, modify_settings
  5. @unittest.skipUnless(connection.vendor == "postgresql", "PostgreSQL specific tests")
  6. # To register type handlers and locate the widget's template.
  7. @modify_settings(INSTALLED_APPS={"append": "django.contrib.postgres"})
  8. class PostgreSQLSimpleTestCase(SimpleTestCase):
  9. pass
  10. @unittest.skipUnless(connection.vendor == "postgresql", "PostgreSQL specific tests")
  11. # To register type handlers and locate the widget's template.
  12. @modify_settings(INSTALLED_APPS={"append": "django.contrib.postgres"})
  13. class PostgreSQLTestCase(TestCase):
  14. pass
  15. @unittest.skipUnless(connection.vendor == "postgresql", "PostgreSQL specific tests")
  16. # To locate the widget's template.
  17. @modify_settings(INSTALLED_APPS={"append": "django.contrib.postgres"})
  18. class PostgreSQLWidgetTestCase(WidgetTest, PostgreSQLSimpleTestCase):
  19. pass