浏览代码

Fixed date_time_picker_shortcuts() tests on Windows.

Windows does not allow overriding TIME_ZONE as time.tzset() is only
available on Unix.
David Smith 1 年之前
父节点
当前提交
0cfcab4eec
共有 1 个文件被更改,包括 2 次插入0 次删除
  1. 2 0
      tests/admin_widgets/tests.py

+ 2 - 0
tests/admin_widgets/tests.py

@@ -23,6 +23,7 @@ from django.db.models import (
     UUIDField,
 )
 from django.test import SimpleTestCase, TestCase, ignore_warnings, override_settings
+from django.test.utils import requires_tz_support
 from django.urls import reverse
 from django.utils import translation
 from django.utils.deprecation import RemovedInDjango60Warning
@@ -1120,6 +1121,7 @@ class DateTimePickerSeleniumTests(AdminWidgetSeleniumTestCase):
                 self.wait_for_text("#calendarin0 caption", expected_caption)
 
 
+@requires_tz_support
 @override_settings(TIME_ZONE="Asia/Singapore")
 class DateTimePickerShortcutsSeleniumTests(AdminWidgetSeleniumTestCase):
     def test_date_time_picker_shortcuts(self):