Commit 56250007 authored by Arnaud Fontaine's avatar Arnaud Fontaine

ERP5TypeFunctionalTestCase: Backported from master branch to use the latest...

ERP5TypeFunctionalTestCase: Backported from master branch to use the latest Firefox with geckodriver/marionette.

erp5testnode for Functional Tests uses:
  https://lab.nexedi.com/nexedi/slapos/raw/master/software/seleniumrunner/software.cfg
parent c063c8d0
......@@ -281,6 +281,20 @@ class ERP5TypeTestCaseMixin(ProcessingNodeTestCase, PortalTestCase):
assert date_time is None or isinstance(date_time, DateTime)
_pinned_date_time = date_time
def setTimeZoneToUTC(self):
"""
Backported from master branch (see ERP5TypeFunctionalTestCase)
"""
# Make sure tests runs with UTC timezone. Some tests are checking values
# based on now, and this could give unexpected results:
# DateTime("2016/10/31") - DateTime("2016/10/30") = 1.0416666666666667 if
# you are running on a timezone like Europe/Paris, while it return 1.0 for
# UTC
os.environ['TZ'] = "UTC"
time.tzset()
DateTime._isDST = False
DateTime._localzone = DateTime._localzone0 = DateTime._localzone1 = "UTC"
def unpinDateTime(self):
self.pinDateTime(None)
......
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