summaryrefslogtreecommitdiff
path: root/tests/db_functions/window
diff options
context:
space:
mode:
authordjango-bot <ops@djangoproject.com>2022-02-08 12:09:55 +0100
committerMariusz Felisiak <felisiak.mariusz@gmail.com>2022-02-08 12:15:38 +0100
commit6a682b38e75d4c975b4c4493565a59f1bc14397c (patch)
tree0bd9cda550bea26238656d9f120d769e8b41bb9e /tests/db_functions/window
parente73ce08888e6f34d3f050377cfd2fbb733be94a9 (diff)
[4.0.x] Refs #33476 -- Reformatted code with Black.
Backport of 9c19aff7c7561e3a82978a272ecdaad40dda5c00 from main.
Diffstat (limited to 'tests/db_functions/window')
-rw-r--r--tests/db_functions/window/test_validation.py20
1 files changed, 10 insertions, 10 deletions
diff --git a/tests/db_functions/window/test_validation.py b/tests/db_functions/window/test_validation.py
index 2efc88fdfa..43adde442d 100644
--- a/tests/db_functions/window/test_validation.py
+++ b/tests/db_functions/window/test_validation.py
@@ -4,36 +4,36 @@ from django.test import SimpleTestCase
class ValidationTests(SimpleTestCase):
def test_nth_negative_nth_value(self):
- msg = 'NthValue requires a positive integer as for nth'
+ msg = "NthValue requires a positive integer as for nth"
with self.assertRaisesMessage(ValueError, msg):
- NthValue(expression='salary', nth=-1)
+ NthValue(expression="salary", nth=-1)
def test_nth_null_expression(self):
- msg = 'NthValue requires a non-null source expression'
+ msg = "NthValue requires a non-null source expression"
with self.assertRaisesMessage(ValueError, msg):
NthValue(expression=None)
def test_lag_negative_offset(self):
- msg = 'Lag requires a positive integer for the offset'
+ msg = "Lag requires a positive integer for the offset"
with self.assertRaisesMessage(ValueError, msg):
- Lag(expression='salary', offset=-1)
+ Lag(expression="salary", offset=-1)
def test_lead_negative_offset(self):
- msg = 'Lead requires a positive integer for the offset'
+ msg = "Lead requires a positive integer for the offset"
with self.assertRaisesMessage(ValueError, msg):
- Lead(expression='salary', offset=-1)
+ Lead(expression="salary", offset=-1)
def test_null_source_lead(self):
- msg = 'Lead requires a non-null source expression'
+ msg = "Lead requires a non-null source expression"
with self.assertRaisesMessage(ValueError, msg):
Lead(expression=None)
def test_null_source_lag(self):
- msg = 'Lag requires a non-null source expression'
+ msg = "Lag requires a non-null source expression"
with self.assertRaisesMessage(ValueError, msg):
Lag(expression=None)
def test_negative_num_buckets_ntile(self):
- msg = 'num_buckets must be greater than 0'
+ msg = "num_buckets must be greater than 0"
with self.assertRaisesMessage(ValueError, msg):
Ntile(num_buckets=-1)