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/invalid_models_tests | |
| parent | 3f6d939c62efd967f548c27a265748cc2cc47ca5 (diff) | |
Applied Black's 2024 stable style.
https://github.com/psf/black/releases/tag/24.1.0
Diffstat (limited to 'tests/invalid_models_tests')
| -rw-r--r-- | tests/invalid_models_tests/test_models.py | 82 |
1 files changed, 46 insertions, 36 deletions
diff --git a/tests/invalid_models_tests/test_models.py b/tests/invalid_models_tests/test_models.py index f22f273c9a..9d9a09d34e 100644 --- a/tests/invalid_models_tests/test_models.py +++ b/tests/invalid_models_tests/test_models.py @@ -1898,15 +1898,18 @@ class ConstraintsTests(TestCase): self.assertEqual( Model.check(databases=self.databases), - [ - Error( - "'constraints' refers to the nonexistent field 'missing_field'.", - obj=Model, - id="models.E012", - ), - ] - if connection.features.supports_table_check_constraints - else [], + ( + [ + Error( + "'constraints' refers to the nonexistent field " + "'missing_field'.", + obj=Model, + id="models.E012", + ), + ] + if connection.features.supports_table_check_constraints + else [] + ), ) @skipUnlessDBFeature("supports_table_check_constraints") @@ -2252,15 +2255,18 @@ class ConstraintsTests(TestCase): self.assertEqual( Model.check(databases=self.databases), - [ - Error( - "'constraints' refers to the nonexistent field 'missing_field'.", - obj=Model, - id="models.E012", - ), - ] - if connection.features.supports_partial_indexes - else [], + ( + [ + Error( + "'constraints' refers to the nonexistent field " + "'missing_field'.", + obj=Model, + id="models.E012", + ), + ] + if connection.features.supports_partial_indexes + else [] + ), ) def test_unique_constraint_condition_pointing_to_joined_fields(self): @@ -2280,15 +2286,17 @@ class ConstraintsTests(TestCase): self.assertEqual( Model.check(databases=self.databases), - [ - Error( - "'constraints' refers to the joined field 'parent__age__lt'.", - obj=Model, - id="models.E041", - ) - ] - if connection.features.supports_partial_indexes - else [], + ( + [ + Error( + "'constraints' refers to the joined field 'parent__age__lt'.", + obj=Model, + id="models.E041", + ) + ] + if connection.features.supports_partial_indexes + else [] + ), ) def test_unique_constraint_pointing_to_reverse_o2o(self): @@ -2307,15 +2315,17 @@ class ConstraintsTests(TestCase): self.assertEqual( Model.check(databases=self.databases), - [ - Error( - "'constraints' refers to the nonexistent field 'model'.", - obj=Model, - id="models.E012", - ), - ] - if connection.features.supports_partial_indexes - else [], + ( + [ + Error( + "'constraints' refers to the nonexistent field 'model'.", + obj=Model, + id="models.E012", + ), + ] + if connection.features.supports_partial_indexes + else [] + ), ) def test_deferrable_unique_constraint(self): |
