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
Matevz Golob
erp5
Commits
38a9c0e0
Commit
38a9c0e0
authored
Jan 13, 2014
by
Kazuhiko Shiozaki
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
make testOpenOrder result stable by always using Europe/Paris timezone.
parent
563e9782
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
4 deletions
+10
-4
product/ERP5/tests/testOpenOrder.py
product/ERP5/tests/testOpenOrder.py
+10
-4
No files found.
product/ERP5/tests/testOpenOrder.py
View file @
38a9c0e0
...
@@ -25,11 +25,18 @@
...
@@ -25,11 +25,18 @@
#
#
##############################################################################
##############################################################################
import
unittest
import
unittest
from
time
import
tzname
import
os
import
time
from
Products.ERP5Type.tests.ERP5TypeTestCase
import
ERP5TypeTestCase
from
Products.ERP5Type.tests.ERP5TypeTestCase
import
ERP5TypeTestCase
from
Products.ERP5Type.tests.backportUnittest
import
expectedFailure
,
skip
from
Products.ERP5Type.tests.backportUnittest
import
expectedFailure
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
):
"""
"""
...
@@ -232,8 +239,7 @@ class TestOpenOrder(ERP5TypeTestCase):
...
@@ -232,8 +239,7 @@ class TestOpenOrder(ERP5TypeTestCase):
(
D
(
2008
,
3
,
3
,
10
,
0
),
D
(
2008
,
3
,
4
,
10
,
0
)),
(
D
(
2008
,
3
,
3
,
10
,
0
),
D
(
2008
,
3
,
4
,
10
,
0
)),
])
])
testPeriodicityDateList
=
(
skip
(
"can't run if machine timezone is UTC"
)
testPeriodicityDateList
=
expectedFailure
(
_testPeriodicityDateList
)
if
"UTC"
in
tzname
else
expectedFailure
)(
_testPeriodicityDateList
)
def
testPeriodicityDateListUniversal
(
self
):
def
testPeriodicityDateListUniversal
(
self
):
self
.
_testPeriodicityDateList
(
'Universal'
)
self
.
_testPeriodicityDateList
(
'Universal'
)
...
...
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