1
0
mirror of https://github.com/django/django.git synced 2025-01-18 14:24:39 +00:00

Fixed date_time_picker_shortcuts() tests on Windows.

Windows does not allow overriding TIME_ZONE as time.tzset() is only
available on Unix.
This commit is contained in:
David Smith 2023-06-14 07:01:14 +01:00 committed by GitHub
parent 26aedbbc08
commit 0cfcab4eec
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

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