Commit c0bd1854 authored by Nicolas Wavrant's avatar Nicolas Wavrant

erp5_payroll_l10n_fr: tests set up the timezone as the one in which test documents were created

It allows idempotent result on any test node
parent fda444f8
...@@ -25,10 +25,18 @@ ...@@ -25,10 +25,18 @@
# #
############################################################################## ##############################################################################
import difflib import difflib
import os
import time
from DateTime import DateTime from DateTime import DateTime
from Products.ERP5Type.tests.ERP5TypeTestCase import ERP5TypeTestCase from Products.ERP5Type.tests.ERP5TypeTestCase import ERP5TypeTestCase
# As tests rely on documents exported in test bt5, setting up timezone allows
# consistency between test environment execution and virtual ERP5 instance
os.environ['TZ'] = 'GMT'
time.tzset()
DateTime._localzone0 = 'GMT'
class TestDSNSocialDeclarationReport(ERP5TypeTestCase): class TestDSNSocialDeclarationReport(ERP5TypeTestCase):
""" """
Test Suite for the generation of the French Social Declaration Report, Test Suite for the generation of the French Social Declaration Report,
...@@ -46,6 +54,13 @@ class TestDSNSocialDeclarationReport(ERP5TypeTestCase): ...@@ -46,6 +54,13 @@ class TestDSNSocialDeclarationReport(ERP5TypeTestCase):
self.dsn_module = self.portal.getDefaultModuleValue("DSN Monthly Report") self.dsn_module = self.portal.getDefaultModuleValue("DSN Monthly Report")
self.pinDateTime(DateTime(2015, 12, 01)) self.pinDateTime(DateTime(2015, 12, 01))
def patchSomeDocumentDate(self):
"""
Depending of the timezone,
"""
date = self.portal.payroll_enrollment_record_module['28'].getCareerStopDate()
def beforeTearDown(self): def beforeTearDown(self):
self.unpinDateTime() self.unpinDateTime()
......
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