summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorJon Dufresne <jon.dufresne@gmail.com>2019-11-18 06:25:59 -0800
committerMariusz Felisiak <felisiak.mariusz@gmail.com>2019-11-18 15:25:59 +0100
commite649d691f8c6148ae5a048647783095319e036bb (patch)
treeda395888bd147984c994e05a6dee338f902aefe1 /tests
parent11e327a3ff84e16ceace13ea6ec408a93ca9e72c (diff)
Removed unnecessary parentheses in various code.
Diffstat (limited to 'tests')
-rw-r--r--tests/migrations/test_state.py2
-rw-r--r--tests/queries/tests.py2
2 files changed, 2 insertions, 2 deletions
diff --git a/tests/migrations/test_state.py b/tests/migrations/test_state.py
index e9bdac93c5..267b75c811 100644
--- a/tests/migrations/test_state.py
+++ b/tests/migrations/test_state.py
@@ -657,7 +657,7 @@ class StateTests(SimpleTestCase):
return [mod for mod in state.apps.get_models() if mod._meta.model_name == 'a'][0]
project_state = ProjectState()
- project_state.add_model((ModelState.from_model(A)))
+ project_state.add_model(ModelState.from_model(A))
self.assertEqual(len(get_model_a(project_state)._meta.related_objects), 1)
old_state = project_state.clone()
diff --git a/tests/queries/tests.py b/tests/queries/tests.py
index 081fb89d54..e57cad79ef 100644
--- a/tests/queries/tests.py
+++ b/tests/queries/tests.py
@@ -3441,7 +3441,7 @@ class DisjunctionPromotionTests(TestCase):
self.assertEqual(str(qs.query).count('LEFT OUTER JOIN'), 3)
self.assertEqual(str(qs.query).count('INNER JOIN'), 0)
qs = BaseA.objects.filter(
- (Q(a__f1='foo') | (Q(a__f1='bar')) & (Q(b__f1='bar') | Q(c__f1='foo')))
+ Q(a__f1='foo') | Q(a__f1='bar') & (Q(b__f1='bar') | Q(c__f1='foo'))
)
self.assertEqual(str(qs.query).count('LEFT OUTER JOIN'), 2)
self.assertEqual(str(qs.query).count('INNER JOIN'), 1)