diff options
| author | Mariusz Felisiak <felisiak.mariusz@gmail.com> | 2024-01-26 12:45:07 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-01-26 12:45:07 +0100 |
| commit | 305757aec19c9d5111e4d76095ae0acd66163e4b (patch) | |
| tree | 04aa017e66c06b3b19cb466ed4e1d73cd871523d /tests/postgres_tests | |
| parent | 3f6d939c62efd967f548c27a265748cc2cc47ca5 (diff) | |
Applied Black's 2024 stable style.
https://github.com/psf/black/releases/tag/24.1.0
Diffstat (limited to 'tests/postgres_tests')
| -rw-r--r-- | tests/postgres_tests/fields.py | 1 | ||||
| -rw-r--r-- | tests/postgres_tests/test_constraints.py | 5 | ||||
| -rw-r--r-- | tests/postgres_tests/test_search.py | 1 |
3 files changed, 5 insertions, 2 deletions
diff --git a/tests/postgres_tests/fields.py b/tests/postgres_tests/fields.py index c2513fca0c..c5dddf197f 100644 --- a/tests/postgres_tests/fields.py +++ b/tests/postgres_tests/fields.py @@ -2,6 +2,7 @@ Indirection layer for PostgreSQL-specific fields, so the tests don't fail when run with a backend other than PostgreSQL. """ + import enum from django.db import models diff --git a/tests/postgres_tests/test_constraints.py b/tests/postgres_tests/test_constraints.py index bf47833743..e5a8e9dbe9 100644 --- a/tests/postgres_tests/test_constraints.py +++ b/tests/postgres_tests/test_constraints.py @@ -300,8 +300,9 @@ class ExclusionConstraintTests(PostgreSQLTestCase): def test_empty_expressions(self): msg = "At least one expression is required to define an exclusion constraint." for empty_expressions in (None, []): - with self.subTest(empty_expressions), self.assertRaisesMessage( - ValueError, msg + with ( + self.subTest(empty_expressions), + self.assertRaisesMessage(ValueError, msg), ): ExclusionConstraint( index_type="GIST", diff --git a/tests/postgres_tests/test_search.py b/tests/postgres_tests/test_search.py index 6f6318899c..472dca6c7b 100644 --- a/tests/postgres_tests/test_search.py +++ b/tests/postgres_tests/test_search.py @@ -5,6 +5,7 @@ These tests use dialogue from the 1975 film Monty Python and the Holy Grail. All text copyright Python (Monty) Pictures. Thanks to sacred-texts.com for the transcript. """ + from django.db.models import F, Value from . import PostgreSQLSimpleTestCase, PostgreSQLTestCase |
