11# pylint: disable=E1002
22# E1002: Use of super on an old style class
3+ import os
4+ import re
5+ import time
6+ from urllib .parse import urljoin , urlparse
7+
8+ import collective .MockMailHost
9+ import requests
310from plone .app .contenttypes .testing import PLONE_APP_CONTENTTYPES_FIXTURE
4- from plone .app .i18n .locales .interfaces import IContentLanguages
5- from plone .app .i18n .locales .interfaces import IMetadataLanguages
6- from plone .app .testing import applyProfile
7- from plone .app .testing import FunctionalTesting
8- from plone .app .testing import IntegrationTesting
9- from plone .app .testing import login
10- from plone .app .testing import PloneSandboxLayer
11- from plone .app .testing import quickInstallProduct
12- from plone .app .testing import setRoles
13- from plone .app .testing import SITE_OWNER_NAME
14- from plone .app .testing import SITE_OWNER_PASSWORD
15- from plone .app .testing import TEST_USER_ID
11+ from plone .app .i18n .locales .interfaces import IContentLanguages , IMetadataLanguages
12+ from plone .app .testing import (
13+ SITE_OWNER_NAME ,
14+ SITE_OWNER_PASSWORD ,
15+ TEST_USER_ID ,
16+ FunctionalTesting ,
17+ IntegrationTesting ,
18+ PloneSandboxLayer ,
19+ applyProfile ,
20+ login ,
21+ quickInstallProduct ,
22+ setRoles ,
23+ )
1624from plone .i18n .interfaces import ILanguageSchema
1725from plone .registry .interfaces import IRegistry
18- from plone .restapi .tests .dxtypes import INDEXES as DX_TYPES_INDEXES
19- from plone .restapi .tests .helpers import add_catalog_indexes
2026from plone .testing import zope
2127from plone .testing .layer import Layer
2228from plone .uuid .interfaces import IUUIDGenerator
2329from Products .CMFCore .utils import getToolByName
2430from requests .exceptions import ConnectionError
25- from urllib .parse import urljoin
26- from urllib .parse import urlparse
27- from zope .component import getGlobalSiteManager
28- from zope .component import getUtility
31+ from zope .component import getGlobalSiteManager , getUtility
2932from zope .configuration import xmlconfig
3033from zope .interface import implementer
3134
32- import collective .MockMailHost
33- import os
34- import re
35- import requests
36- import time
35+ from plone .restapi .tests .dxtypes import INDEXES as DX_TYPES_INDEXES
36+ from plone .restapi .tests .helpers import add_catalog_indexes
3737
3838try :
3939 from plone .app .caching .testing import PloneAppCachingBase
@@ -77,7 +77,8 @@ class DateTimeFixture(Layer):
7777 def setUp (self ):
7878 tz = "UTC"
7979 os .environ ["TZ" ] = tz
80- time .tzset ()
80+ if os .name != "nt" :
81+ time .tzset ()
8182
8283 # Patch DateTime's timezone for deterministic behavior.
8384 from DateTime import DateTime
@@ -95,7 +96,8 @@ def setUp(self):
9596 def tearDown (self ):
9697 if "TZ" in os .environ :
9798 del os .environ ["TZ" ]
98- time .tzset ()
99+ if os .name != "nt" :
100+ time .tzset ()
99101
100102 from DateTime import DateTime
101103
0 commit comments