summaryrefslogtreecommitdiff
path: root/tests/postgres_tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests/postgres_tests')
-rw-r--r--tests/postgres_tests/__init__.py2
-rw-r--r--tests/postgres_tests/test_aggregates.py6
-rw-r--r--tests/postgres_tests/test_array.py16
-rw-r--r--tests/postgres_tests/test_hstore.py14
-rw-r--r--tests/postgres_tests/test_json.py6
-rw-r--r--tests/postgres_tests/test_ranges.py8
-rw-r--r--tests/postgres_tests/test_unaccent.py4
7 files changed, 28 insertions, 28 deletions
diff --git a/tests/postgres_tests/__init__.py b/tests/postgres_tests/__init__.py
index 9076bef850..55b88427ef 100644
--- a/tests/postgres_tests/__init__.py
+++ b/tests/postgres_tests/__init__.py
@@ -5,5 +5,5 @@ from django.test import TestCase
@unittest.skipUnless(connection.vendor == 'postgresql', "PostgreSQL specific tests")
-class PostgresSQLTestCase(TestCase):
+class PostgreSQLTestCase(TestCase):
pass
diff --git a/tests/postgres_tests/test_aggregates.py b/tests/postgres_tests/test_aggregates.py
index 4ce0d4237a..07e4ea0101 100644
--- a/tests/postgres_tests/test_aggregates.py
+++ b/tests/postgres_tests/test_aggregates.py
@@ -6,11 +6,11 @@ from django.contrib.postgres.aggregates import (
from django.db.models.expressions import F, Value
from django.test.utils import Approximate
-from . import PostgresSQLTestCase
+from . import PostgreSQLTestCase
from .models import AggregateTestModel, StatTestModel
-class TestGeneralAggregate(PostgresSQLTestCase):
+class TestGeneralAggregate(PostgreSQLTestCase):
@classmethod
def setUpTestData(cls):
AggregateTestModel.objects.create(boolean_field=True, char_field='Foo1', integer_field=0)
@@ -111,7 +111,7 @@ class TestGeneralAggregate(PostgresSQLTestCase):
self.assertEqual(values, {'stringagg': ''})
-class TestStatisticsAggregate(PostgresSQLTestCase):
+class TestStatisticsAggregate(PostgreSQLTestCase):
@classmethod
def setUpTestData(cls):
StatTestModel.objects.create(
diff --git a/tests/postgres_tests/test_array.py b/tests/postgres_tests/test_array.py
index 895c910a8b..a893a95406 100644
--- a/tests/postgres_tests/test_array.py
+++ b/tests/postgres_tests/test_array.py
@@ -10,7 +10,7 @@ from django.db import IntegrityError, connection, models
from django.test import TransactionTestCase, override_settings
from django.utils import timezone
-from . import PostgresSQLTestCase
+from . import PostgreSQLTestCase
from .models import (
ArrayFieldSubclass, CharArrayModel, DateTimeArrayModel, IntegerArrayModel,
NestedIntegerArrayModel, NullableIntegerArrayModel, OtherTypesArrayModel,
@@ -23,7 +23,7 @@ except ImportError:
pass
-class TestSaveLoad(PostgresSQLTestCase):
+class TestSaveLoad(PostgreSQLTestCase):
def test_integer(self):
instance = IntegerArrayModel(field=[1, 2, 3])
@@ -98,7 +98,7 @@ class TestSaveLoad(PostgresSQLTestCase):
self.assertEqual(instance.decimals, loaded.decimals)
-class TestQuerying(PostgresSQLTestCase):
+class TestQuerying(PostgreSQLTestCase):
def setUp(self):
self.objs = [
@@ -229,7 +229,7 @@ class TestQuerying(PostgresSQLTestCase):
)
-class TestChecks(PostgresSQLTestCase):
+class TestChecks(PostgreSQLTestCase):
def test_field_checks(self):
field = ArrayField(models.CharField())
@@ -294,7 +294,7 @@ class TestMigrations(TransactionTestCase):
self.assertNotIn(table_name, connection.introspection.table_names(cursor))
-class TestSerialization(PostgresSQLTestCase):
+class TestSerialization(PostgreSQLTestCase):
test_data = '[{"fields": {"field": "[\\"1\\", \\"2\\"]"}, "model": "postgres_tests.integerarraymodel", "pk": null}]'
def test_dumping(self):
@@ -307,7 +307,7 @@ class TestSerialization(PostgresSQLTestCase):
self.assertEqual(instance.field, [1, 2])
-class TestValidation(PostgresSQLTestCase):
+class TestValidation(PostgreSQLTestCase):
def test_unbounded(self):
field = ArrayField(models.IntegerField())
@@ -345,7 +345,7 @@ class TestValidation(PostgresSQLTestCase):
self.assertEqual(cm.exception.messages[0], 'Item 0 in the array did not validate: Ensure this value is greater than or equal to 1.')
-class TestSimpleFormField(PostgresSQLTestCase):
+class TestSimpleFormField(PostgreSQLTestCase):
def test_valid(self):
field = SimpleArrayField(forms.CharField())
@@ -417,7 +417,7 @@ class TestSimpleFormField(PostgresSQLTestCase):
self.assertEqual(form_field.max_length, 4)
-class TestSplitFormField(PostgresSQLTestCase):
+class TestSplitFormField(PostgreSQLTestCase):
def test_valid(self):
class SplitForm(forms.Form):
diff --git a/tests/postgres_tests/test_hstore.py b/tests/postgres_tests/test_hstore.py
index 50a4702716..398f444167 100644
--- a/tests/postgres_tests/test_hstore.py
+++ b/tests/postgres_tests/test_hstore.py
@@ -3,7 +3,7 @@ import json
from django.core import exceptions, serializers
from django.forms import Form
-from . import PostgresSQLTestCase
+from . import PostgreSQLTestCase
from .models import HStoreModel
try:
@@ -14,7 +14,7 @@ except ImportError:
pass
-class SimpleTests(PostgresSQLTestCase):
+class SimpleTests(PostgreSQLTestCase):
apps = ['django.contrib.postgres']
def test_save_load_success(self):
@@ -38,7 +38,7 @@ class SimpleTests(PostgresSQLTestCase):
self.assertEqual(reloaded.field, value)
-class TestQuerying(PostgresSQLTestCase):
+class TestQuerying(PostgreSQLTestCase):
def setUp(self):
self.objs = [
@@ -133,7 +133,7 @@ class TestQuerying(PostgresSQLTestCase):
)
-class TestSerialization(PostgresSQLTestCase):
+class TestSerialization(PostgreSQLTestCase):
test_data = '[{"fields": {"field": "{\\"a\\": \\"b\\"}"}, "model": "postgres_tests.hstoremodel", "pk": null}]'
def test_dumping(self):
@@ -146,7 +146,7 @@ class TestSerialization(PostgresSQLTestCase):
self.assertEqual(instance.field, {'a': 'b'})
-class TestValidation(PostgresSQLTestCase):
+class TestValidation(PostgreSQLTestCase):
def test_not_a_string(self):
field = HStoreField()
@@ -156,7 +156,7 @@ class TestValidation(PostgresSQLTestCase):
self.assertEqual(cm.exception.message % cm.exception.params, 'The value of "a" is not a string.')
-class TestFormField(PostgresSQLTestCase):
+class TestFormField(PostgreSQLTestCase):
def test_valid(self):
field = forms.HStoreField()
@@ -192,7 +192,7 @@ class TestFormField(PostgresSQLTestCase):
self.assertFalse(form_w_hstore.has_changed())
-class TestValidator(PostgresSQLTestCase):
+class TestValidator(PostgreSQLTestCase):
def test_simple_valid(self):
validator = KeysValidator(keys=['a', 'b'])
diff --git a/tests/postgres_tests/test_json.py b/tests/postgres_tests/test_json.py
index b59abe7898..9637d47ec6 100644
--- a/tests/postgres_tests/test_json.py
+++ b/tests/postgres_tests/test_json.py
@@ -5,7 +5,7 @@ from django.core import exceptions, serializers
from django.db import connection
from django.test import TestCase
-from . import PostgresSQLTestCase
+from . import PostgreSQLTestCase
from .models import JSONModel
try:
@@ -219,7 +219,7 @@ class TestSerialization(TestCase):
self.assertEqual(instance.field, {'a': 'b'})
-class TestValidation(PostgresSQLTestCase):
+class TestValidation(PostgreSQLTestCase):
def test_not_serializable(self):
field = JSONField()
@@ -229,7 +229,7 @@ class TestValidation(PostgresSQLTestCase):
self.assertEqual(cm.exception.message % cm.exception.params, "Value must be valid JSON.")
-class TestFormField(PostgresSQLTestCase):
+class TestFormField(PostgreSQLTestCase):
def test_valid(self):
field = forms.JSONField()
diff --git a/tests/postgres_tests/test_ranges.py b/tests/postgres_tests/test_ranges.py
index 5ec6dae27b..7cd8a60b2f 100644
--- a/tests/postgres_tests/test_ranges.py
+++ b/tests/postgres_tests/test_ranges.py
@@ -8,7 +8,7 @@ from django.db import connection
from django.test import TestCase, override_settings
from django.utils import timezone
-from . import PostgresSQLTestCase
+from . import PostgreSQLTestCase
from .models import RangesModel
try:
@@ -222,7 +222,7 @@ class TestSerialization(TestCase):
self.assertEqual(instance.dates, None)
-class TestValidators(PostgresSQLTestCase):
+class TestValidators(PostgreSQLTestCase):
def test_max(self):
validator = RangeMaxValueValidator(5)
@@ -241,7 +241,7 @@ class TestValidators(PostgresSQLTestCase):
self.assertEqual(cm.exception.code, 'min_value')
-class TestFormField(PostgresSQLTestCase):
+class TestFormField(PostgreSQLTestCase):
def test_valid_integer(self):
field = pg_forms.IntegerRangeField()
@@ -508,7 +508,7 @@ class TestFormField(PostgresSQLTestCase):
self.assertIsInstance(form_field, pg_forms.DateTimeRangeField)
-class TestWidget(PostgresSQLTestCase):
+class TestWidget(PostgreSQLTestCase):
def test_range_widget(self):
f = pg_forms.ranges.DateTimeRangeField()
self.assertHTMLEqual(
diff --git a/tests/postgres_tests/test_unaccent.py b/tests/postgres_tests/test_unaccent.py
index af1618d183..9d9a954be9 100644
--- a/tests/postgres_tests/test_unaccent.py
+++ b/tests/postgres_tests/test_unaccent.py
@@ -3,12 +3,12 @@ from __future__ import unicode_literals
from django.test import modify_settings
-from . import PostgresSQLTestCase
+from . import PostgreSQLTestCase
from .models import CharFieldModel, TextFieldModel
@modify_settings(INSTALLED_APPS={'append': 'django.contrib.postgres'})
-class UnaccentTest(PostgresSQLTestCase):
+class UnaccentTest(PostgreSQLTestCase):
Model = CharFieldModel