summaryrefslogtreecommitdiff
path: root/tests/gis_tests/test_gis_tests_utils.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/gis_tests/test_gis_tests_utils.py')
-rw-r--r--tests/gis_tests/test_gis_tests_utils.py19
1 files changed, 10 insertions, 9 deletions
diff --git a/tests/gis_tests/test_gis_tests_utils.py b/tests/gis_tests/test_gis_tests_utils.py
index 96eea8a9c2..31b2210805 100644
--- a/tests/gis_tests/test_gis_tests_utils.py
+++ b/tests/gis_tests/test_gis_tests_utils.py
@@ -11,28 +11,29 @@ def test_mutation(raises=True):
output_field = models.IntegerField()
def __init__(self):
- self.attribute = 'initial'
- super().__init__('initial', ['initial'])
+ self.attribute = "initial"
+ super().__init__("initial", ["initial"])
def as_sql(self, *args, **kwargs):
mutation_func(self)
- return '', ()
+ return "", ()
if raises:
- msg = 'TestFunc Func was mutated during compilation.'
+ msg = "TestFunc Func was mutated during compilation."
with test_case_instance.assertRaisesMessage(AssertionError, msg):
- getattr(TestFunc(), 'as_' + connection.vendor)(None, None)
+ getattr(TestFunc(), "as_" + connection.vendor)(None, None)
else:
- getattr(TestFunc(), 'as_' + connection.vendor)(None, None)
+ getattr(TestFunc(), "as_" + connection.vendor)(None, None)
return test
+
return wrapper
class FuncTestMixinTests(FuncTestMixin, SimpleTestCase):
@test_mutation()
def test_mutated_attribute(func):
- func.attribute = 'mutated'
+ func.attribute = "mutated"
@test_mutation()
def test_mutated_expressions(func):
@@ -40,11 +41,11 @@ class FuncTestMixinTests(FuncTestMixin, SimpleTestCase):
@test_mutation()
def test_mutated_expression(func):
- func.source_expressions[0].name = 'mutated'
+ func.source_expressions[0].name = "mutated"
@test_mutation()
def test_mutated_expression_deep(func):
- func.source_expressions[1].value[0] = 'mutated'
+ func.source_expressions[1].value[0] = "mutated"
@test_mutation(raises=False)
def test_not_mutated(func):