From 7eee1dca420ee7c4451d24cd32fa08aed0dcbb36 Mon Sep 17 00:00:00 2001 From: Adrian Torres Date: Thu, 10 Nov 2022 19:31:31 +0100 Subject: Fixed #14094 -- Added support for unlimited CharField on PostgreSQL. Co-authored-by: Mariusz Felisiak --- tests/postgres_tests/test_array.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'tests/postgres_tests/test_array.py') diff --git a/tests/postgres_tests/test_array.py b/tests/postgres_tests/test_array.py index 86e9d00b41..4808f88689 100644 --- a/tests/postgres_tests/test_array.py +++ b/tests/postgres_tests/test_array.py @@ -776,12 +776,12 @@ class TestOtherTypesExactQuerying(PostgreSQLTestCase): class TestChecks(PostgreSQLSimpleTestCase): def test_field_checks(self): class MyModel(PostgreSQLModel): - field = ArrayField(models.CharField()) + field = ArrayField(models.CharField(max_length=-1)) model = MyModel() errors = model.check() self.assertEqual(len(errors), 1) - # The inner CharField is missing a max_length. + # The inner CharField has a non-positive max_length. self.assertEqual(errors[0].id, "postgres.E001") self.assertIn("max_length", errors[0].msg) @@ -837,12 +837,12 @@ class TestChecks(PostgreSQLSimpleTestCase): """ class MyModel(PostgreSQLModel): - field = ArrayField(ArrayField(models.CharField())) + field = ArrayField(ArrayField(models.CharField(max_length=-1))) model = MyModel() errors = model.check() self.assertEqual(len(errors), 1) - # The inner CharField is missing a max_length. + # The inner CharField has a non-positive max_length. self.assertEqual(errors[0].id, "postgres.E001") self.assertIn("max_length", errors[0].msg) -- cgit v1.3