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/db_functions | |
| parent | 3f6d939c62efd967f548c27a265748cc2cc47ca5 (diff) | |
Applied Black's 2024 stable style.
https://github.com/psf/black/releases/tag/24.1.0
Diffstat (limited to 'tests/db_functions')
| -rw-r--r-- | tests/db_functions/comparison/test_nullif.py | 8 | ||||
| -rw-r--r-- | tests/db_functions/datetime/test_extract_trunc.py | 8 | ||||
| -rw-r--r-- | tests/db_functions/models.py | 1 | ||||
| -rw-r--r-- | tests/db_functions/text/test_md5.py | 8 | ||||
| -rw-r--r-- | tests/db_functions/text/test_sha1.py | 8 | ||||
| -rw-r--r-- | tests/db_functions/text/test_sha224.py | 8 | ||||
| -rw-r--r-- | tests/db_functions/text/test_sha256.py | 8 | ||||
| -rw-r--r-- | tests/db_functions/text/test_sha384.py | 10 | ||||
| -rw-r--r-- | tests/db_functions/text/test_sha512.py | 10 |
9 files changed, 43 insertions, 26 deletions
diff --git a/tests/db_functions/comparison/test_nullif.py b/tests/db_functions/comparison/test_nullif.py index 9839e6b4c5..cdbc3d6960 100644 --- a/tests/db_functions/comparison/test_nullif.py +++ b/tests/db_functions/comparison/test_nullif.py @@ -23,9 +23,11 @@ class NullIfTests(TestCase): [ ("smithj",), ( - "" - if connection.features.interprets_empty_strings_as_nulls - else None, + ( + "" + if connection.features.interprets_empty_strings_as_nulls + else None + ), ), ], ) diff --git a/tests/db_functions/datetime/test_extract_trunc.py b/tests/db_functions/datetime/test_extract_trunc.py index 29212b6e24..e576e6e464 100644 --- a/tests/db_functions/datetime/test_extract_trunc.py +++ b/tests/db_functions/datetime/test_extract_trunc.py @@ -113,9 +113,11 @@ class DateFunctionTests(TestCase): end_date=end_datetime.date() if end_datetime else None, start_time=start_datetime.time() if start_datetime else None, end_time=end_datetime.time() if end_datetime else None, - duration=(end_datetime - start_datetime) - if start_datetime and end_datetime - else None, + duration=( + (end_datetime - start_datetime) + if start_datetime and end_datetime + else None + ), ) def test_extract_year_exact_lookup(self): diff --git a/tests/db_functions/models.py b/tests/db_functions/models.py index d6a06511bc..c126f1bae1 100644 --- a/tests/db_functions/models.py +++ b/tests/db_functions/models.py @@ -1,6 +1,7 @@ """ Tests for built in Function expressions. """ + from django.db import models diff --git a/tests/db_functions/text/test_md5.py b/tests/db_functions/text/test_md5.py index fd0aec58f2..4fd66f0397 100644 --- a/tests/db_functions/text/test_md5.py +++ b/tests/db_functions/text/test_md5.py @@ -35,9 +35,11 @@ class MD5Tests(TestCase): "ca6d48f6772000141e66591aee49d56c", "bf2c13bc1154e3d2e7df848cbc8be73d", "d41d8cd98f00b204e9800998ecf8427e", - "d41d8cd98f00b204e9800998ecf8427e" - if connection.features.interprets_empty_strings_as_nulls - else None, + ( + "d41d8cd98f00b204e9800998ecf8427e" + if connection.features.interprets_empty_strings_as_nulls + else None + ), ], ) diff --git a/tests/db_functions/text/test_sha1.py b/tests/db_functions/text/test_sha1.py index 175c5727ff..ef846d07aa 100644 --- a/tests/db_functions/text/test_sha1.py +++ b/tests/db_functions/text/test_sha1.py @@ -35,9 +35,11 @@ class SHA1Tests(TestCase): "0781e0745a2503e6ded05ed5bc554c421d781b0c", "198d15ea139de04060caf95bc3e0ec5883cba881", "da39a3ee5e6b4b0d3255bfef95601890afd80709", - "da39a3ee5e6b4b0d3255bfef95601890afd80709" - if connection.features.interprets_empty_strings_as_nulls - else None, + ( + "da39a3ee5e6b4b0d3255bfef95601890afd80709" + if connection.features.interprets_empty_strings_as_nulls + else None + ), ], ) diff --git a/tests/db_functions/text/test_sha224.py b/tests/db_functions/text/test_sha224.py index a6254f43e3..60d9e378a6 100644 --- a/tests/db_functions/text/test_sha224.py +++ b/tests/db_functions/text/test_sha224.py @@ -37,9 +37,11 @@ class SHA224Tests(TestCase): "2297904883e78183cb118fc3dc21a610d60daada7b6ebdbc85139f4d", "eba942746e5855121d9d8f79e27dfdebed81adc85b6bf41591203080", "d14a028c2a3a2bc9476102bb288234c415a2b01f828ea62ac5b3e42f", - "d14a028c2a3a2bc9476102bb288234c415a2b01f828ea62ac5b3e42f" - if connection.features.interprets_empty_strings_as_nulls - else None, + ( + "d14a028c2a3a2bc9476102bb288234c415a2b01f828ea62ac5b3e42f" + if connection.features.interprets_empty_strings_as_nulls + else None + ), ], ) diff --git a/tests/db_functions/text/test_sha256.py b/tests/db_functions/text/test_sha256.py index b399dbecd3..0cf72783e7 100644 --- a/tests/db_functions/text/test_sha256.py +++ b/tests/db_functions/text/test_sha256.py @@ -35,9 +35,11 @@ class SHA256Tests(TestCase): "6e4cce20cd83fc7c202f21a8b2452a68509cf24d1c272a045b5e0cfc43f0d94e", "3ad2039e3ec0c88973ae1c0fce5a3dbafdd5a1627da0a92312c54ebfcf43988e", "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", - "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855" - if connection.features.interprets_empty_strings_as_nulls - else None, + ( + "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855" + if connection.features.interprets_empty_strings_as_nulls + else None + ), ], ) diff --git a/tests/db_functions/text/test_sha384.py b/tests/db_functions/text/test_sha384.py index 250cadda4a..a4d07d3295 100644 --- a/tests/db_functions/text/test_sha384.py +++ b/tests/db_functions/text/test_sha384.py @@ -39,10 +39,12 @@ class SHA384Tests(TestCase): "26676a43c7ba378621175853b0", "38b060a751ac96384cd9327eb1b1e36a21fdb71114be07434c0cc7bf63f6e1da274ede" "bfe76f65fbd51ad2f14898b95b", - "38b060a751ac96384cd9327eb1b1e36a21fdb71114be07434c0cc7bf63f6e1da274ede" - "bfe76f65fbd51ad2f14898b95b" - if connection.features.interprets_empty_strings_as_nulls - else None, + ( + "38b060a751ac96384cd9327eb1b1e36a21fdb71114be07434c0cc7bf63f6e1da27" + "4edebfe76f65fbd51ad2f14898b95b" + if connection.features.interprets_empty_strings_as_nulls + else None + ), ], ) diff --git a/tests/db_functions/text/test_sha512.py b/tests/db_functions/text/test_sha512.py index f5a7ad4ae5..b4c7a4bbd8 100644 --- a/tests/db_functions/text/test_sha512.py +++ b/tests/db_functions/text/test_sha512.py @@ -39,10 +39,12 @@ class SHA512Tests(TestCase): "172d88798345a3a7666faf5f35a144c60812d3234dcd35f444624f2faee16857", "cf83e1357eefb8bdf1542850d66d8007d620e4050b5715dc83f4a921d36ce9ce" "47d0d13c5d85f2b0ff8318d2877eec2f63b931bd47417a81a538327af927da3e", - "cf83e1357eefb8bdf1542850d66d8007d620e4050b5715dc83f4a921d36ce9ce" - "47d0d13c5d85f2b0ff8318d2877eec2f63b931bd47417a81a538327af927da3e" - if connection.features.interprets_empty_strings_as_nulls - else None, + ( + "cf83e1357eefb8bdf1542850d66d8007d620e4050b5715dc83f4a921d36ce9ce" + "47d0d13c5d85f2b0ff8318d2877eec2f63b931bd47417a81a538327af927da3e" + if connection.features.interprets_empty_strings_as_nulls + else None + ), ], ) |
