mirror of
https://github.com/topydo/topydo.git
synced 2024-05-20 05:48:35 +00:00
Fix geo test time errors in tests
The freezetime decorator was giving a time of the previous day if the test was run for time zones west of Greenwich.
This commit is contained in:
parent
e7ffc32168
commit
715a7216b7
|
@ -18,6 +18,7 @@ import codecs
|
|||
import os
|
||||
import re
|
||||
import sys
|
||||
import time
|
||||
import unittest
|
||||
from collections import namedtuple
|
||||
|
||||
|
@ -592,7 +593,7 @@ class ListCommandIcalTest(CommandTest):
|
|||
self.assertEqual(self.errors, "")
|
||||
|
||||
|
||||
@freeze_time('2016, 11, 17')
|
||||
@freeze_time('2016-11-17 00:00:00', tz_offset = time.timezone/3600)
|
||||
class ListCommandDotTest(CommandTest):
|
||||
def setUp(self):
|
||||
self.maxDiff = None
|
||||
|
@ -615,7 +616,7 @@ class ListCommandDotTest(CommandTest):
|
|||
self.assertEqual(self.errors, "")
|
||||
|
||||
|
||||
@freeze_time('2016, 12, 6')
|
||||
@freeze_time('2016-12-6 00:00:00', tz_offset = time.timezone/3600)
|
||||
class ListCommandGroupTest(CommandTest):
|
||||
def test_group1(self):
|
||||
todolist = load_file_to_todolist("test/data/ListCommandGroupTest.txt")
|
||||
|
|
|
@ -14,6 +14,7 @@
|
|||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
import time
|
||||
import unittest
|
||||
from collections import namedtuple
|
||||
|
||||
|
@ -35,7 +36,7 @@ except ImportError:
|
|||
import mock
|
||||
|
||||
|
||||
@freeze_time("2015, 11, 06")
|
||||
@freeze_time("2015-11-06 00:00:00", tz_offset = time.timezone/3600)
|
||||
class ListFormatTest(CommandTest):
|
||||
def setUp(self):
|
||||
super().setUp()
|
||||
|
|
|
@ -16,6 +16,7 @@
|
|||
|
||||
import os
|
||||
import tempfile
|
||||
import time
|
||||
import unittest
|
||||
from datetime import date
|
||||
from glob import glob
|
||||
|
@ -61,7 +62,7 @@ def command_executer(p_cmd, p_args, p_todolist, p_archive=None, *params):
|
|||
archive_command.execute()
|
||||
|
||||
|
||||
@freeze_time('2015, 11, 06')
|
||||
@freeze_time('2015-11-06 00:00:00', tz_offset=time.timezone/3600)
|
||||
class RevertCommandTest(CommandTest):
|
||||
def setUp(self):
|
||||
super().setUp()
|
||||
|
|
Loading…
Reference in a new issue