summaryrefslogtreecommitdiff
path: root/tests/timezones/tests.py
diff options
context:
space:
mode:
authorMariusz Felisiak <felisiak.mariusz@gmail.com>2022-02-08 12:27:04 +0100
committerMariusz Felisiak <felisiak.mariusz@gmail.com>2022-02-08 19:25:02 +0100
commit3278c31fa59b41d03aea167f4cf85f4ddf7f848d (patch)
tree0c80b4868391296335580242c8e65052a4f62a6b /tests/timezones/tests.py
parent6a682b38e75d4c975b4c4493565a59f1bc14397c (diff)
[4.0.x] Refs #33476 -- Refactored code to strictly match 88 characters line length.
Backport of 7119f40c9881666b6f9b5cf7df09ee1d21cc8344 from main.
Diffstat (limited to 'tests/timezones/tests.py')
-rw-r--r--tests/timezones/tests.py14
1 files changed, 10 insertions, 4 deletions
diff --git a/tests/timezones/tests.py b/tests/timezones/tests.py
index fd5ddd7edc..4ebd704f23 100644
--- a/tests/timezones/tests.py
+++ b/tests/timezones/tests.py
@@ -727,7 +727,8 @@ class ForcedTimeZoneDatabaseTests(TransactionTestCase):
raise SkipTest("Database has feature(s) supports_timezones")
if not connection.features.test_db_allows_multiple_connections:
raise SkipTest(
- "Database doesn't support feature(s): test_db_allows_multiple_connections"
+ "Database doesn't support feature(s): "
+ "test_db_allows_multiple_connections"
)
super().setUpClass()
@@ -979,7 +980,8 @@ class TemplateTests(SimpleTestCase):
}
templates = {
"notag": Template(
- "{% load tz %}{{ dt }}|{{ dt|localtime }}|{{ dt|utc }}|{{ dt|timezone:ICT }}"
+ "{% load tz %}"
+ "{{ dt }}|{{ dt|localtime }}|{{ dt|utc }}|{{ dt|timezone:ICT }}"
),
"noarg": Template(
"{% load tz %}{% localtime %}{{ dt }}|{{ dt|localtime }}|"
@@ -1130,7 +1132,8 @@ class TemplateTests(SimpleTestCase):
)
self.assertEqual(
tpl.render(ctx),
- "2011-09-01T13:20:30+03:00|2011-09-01T17:20:30+07:00|2011-09-01T13:20:30+03:00",
+ "2011-09-01T13:20:30+03:00|2011-09-01T17:20:30+07:00|"
+ "2011-09-01T13:20:30+03:00",
)
def test_timezone_templatetag_with_iana(self):
@@ -1217,7 +1220,10 @@ class TemplateTests(SimpleTestCase):
self.assertEqual(tpl.render(Context()), "Europe/Paris")
def test_get_current_timezone_templatetag_invalid_argument(self):
- msg = "'get_current_timezone' requires 'as variable' (got ['get_current_timezone'])"
+ msg = (
+ "'get_current_timezone' requires 'as variable' (got "
+ "['get_current_timezone'])"
+ )
with self.assertRaisesMessage(TemplateSyntaxError, msg):
Template("{% load tz %}{% get_current_timezone %}").render()