Commit 38a9c0e0 authored by Kazuhiko Shiozaki's avatar Kazuhiko Shiozaki

make testOpenOrder result stable by always using Europe/Paris timezone.

parent 563e9782
...@@ -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')
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment