summaryrefslogtreecommitdiff
path: root/tests/postgres_tests/test_array.py
diff options
context:
space:
mode:
authorTim Graham <timograham@gmail.com>2018-11-26 14:05:02 -0500
committerTim Graham <timograham@gmail.com>2018-11-27 08:58:44 -0500
commit193c109327c5216cab1d4eed6bfdff24629b09a3 (patch)
tree3428f61d610f51349df5ab6eb26a4876b54878c5 /tests/postgres_tests/test_array.py
parentf091ea35150d95fc6732bbf0c27b971dd445509a (diff)
downloaddjango-193c109327c5216cab1d4eed6bfdff24629b09a3.tar.gz
Switched TestCase to SimpleTestCase where possible in Django's tests.
Diffstat (limited to 'tests/postgres_tests/test_array.py')
-rw-r--r--tests/postgres_tests/test_array.py14
1 files changed, 8 insertions, 6 deletions
diff --git a/tests/postgres_tests/test_array.py b/tests/postgres_tests/test_array.py
index 25fbc230bb..9c678bb588 100644
--- a/tests/postgres_tests/test_array.py
+++ b/tests/postgres_tests/test_array.py
@@ -12,7 +12,9 @@ from django.test import TransactionTestCase, modify_settings, override_settings
from django.test.utils import isolate_apps
from django.utils import timezone
-from . import PostgreSQLTestCase, PostgreSQLWidgetTestCase
+from . import (
+ PostgreSQLSimpleTestCase, PostgreSQLTestCase, PostgreSQLWidgetTestCase,
+)
from .models import (
ArrayFieldSubclass, CharArrayModel, DateTimeArrayModel, IntegerArrayModel,
NestedIntegerArrayModel, NullableIntegerArrayModel, OtherTypesArrayModel,
@@ -440,7 +442,7 @@ class TestOtherTypesExactQuerying(PostgreSQLTestCase):
@isolate_apps('postgres_tests')
-class TestChecks(PostgreSQLTestCase):
+class TestChecks(PostgreSQLSimpleTestCase):
def test_field_checks(self):
class MyModel(PostgreSQLModel):
@@ -589,7 +591,7 @@ class TestMigrations(TransactionTestCase):
self.assertNotIn(table_name, connection.introspection.table_names(cursor))
-class TestSerialization(PostgreSQLTestCase):
+class TestSerialization(PostgreSQLSimpleTestCase):
test_data = (
'[{"fields": {"field": "[\\"1\\", \\"2\\", null]"}, "model": "postgres_tests.integerarraymodel", "pk": null}]'
)
@@ -604,7 +606,7 @@ class TestSerialization(PostgreSQLTestCase):
self.assertEqual(instance.field, [1, 2, None])
-class TestValidation(PostgreSQLTestCase):
+class TestValidation(PostgreSQLSimpleTestCase):
def test_unbounded(self):
field = ArrayField(models.IntegerField())
@@ -664,7 +666,7 @@ class TestValidation(PostgreSQLTestCase):
self.assertEqual(exception.params, {'nth': 1, 'value': 0, 'limit_value': 1, 'show_value': 0})
-class TestSimpleFormField(PostgreSQLTestCase):
+class TestSimpleFormField(PostgreSQLSimpleTestCase):
def test_valid(self):
field = SimpleArrayField(forms.CharField())
@@ -782,7 +784,7 @@ class TestSimpleFormField(PostgreSQLTestCase):
self.assertIs(field.has_changed([], ''), False)
-class TestSplitFormField(PostgreSQLTestCase):
+class TestSplitFormField(PostgreSQLSimpleTestCase):
def test_valid(self):
class SplitForm(forms.Form):