Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
erp5
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Léo-Paul Géneau
erp5
Commits
35969925
Commit
35969925
authored
Jan 28, 2023
by
Arnaud Fontaine
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
squash! ERP5Type.tests.utils: introduce timeZoneContext
parent
5a74db87
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
6 deletions
+5
-6
bt5/erp5_open_trade/TestTemplateItem/portal_components/test.erp5.testOpenOrder.py
...TemplateItem/portal_components/test.erp5.testOpenOrder.py
+5
-6
No files found.
bt5/erp5_open_trade/TestTemplateItem/portal_components/test.erp5.testOpenOrder.py
View file @
35969925
...
@@ -31,12 +31,6 @@ from unittest import expectedFailure
...
@@ -31,12 +31,6 @@ from unittest import expectedFailure
from
Products.ERP5Type.tests.ERP5TypeTestCase
import
ERP5TypeTestCase
from
Products.ERP5Type.tests.ERP5TypeTestCase
import
ERP5TypeTestCase
from
DateTime
import
DateTime
from
DateTime
import
DateTime
# explicitly set Europe/Paris timezone
os
.
environ
[
'TZ'
]
=
'Europe/Paris'
time
.
tzset
()
DateTime
.
_localzone0
=
'GMT+1'
DateTime
.
_localzone1
=
'GMT+2'
DateTime
.
_multipleZones
=
True
class
TestOpenOrder
(
ERP5TypeTestCase
):
class
TestOpenOrder
(
ERP5TypeTestCase
):
"""
"""
...
@@ -47,6 +41,11 @@ class TestOpenOrder(ERP5TypeTestCase):
...
@@ -47,6 +41,11 @@ class TestOpenOrder(ERP5TypeTestCase):
return
'Test Open Order'
return
'Test Open Order'
def
afterSetUp
(
self
):
def
afterSetUp
(
self
):
from
Products.ERP5Type.tests.utils
import
timeZoneContext
timezone
=
timeZoneContext
(
'Europe/Paris'
)
timezone
.
__enter__
()
self
.
addCleanup
(
timezone
.
__exit__
,
None
,
None
,
None
)
if
getattr
(
self
.
portal
,
'_run_after_setup'
,
None
)
is
not
None
:
if
getattr
(
self
.
portal
,
'_run_after_setup'
,
None
)
is
not
None
:
return
return
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment