fix recurrence test to avoid wasting a lot of time
This commit is contained in:
committed by
Tomas Babej
parent
19f183159e
commit
6e5d8b1dde
@@ -29,6 +29,7 @@
|
|||||||
import sys
|
import sys
|
||||||
import os
|
import os
|
||||||
import re
|
import re
|
||||||
|
import time
|
||||||
import unittest
|
import unittest
|
||||||
# Ensure python finds the local simpletap module
|
# Ensure python finds the local simpletap module
|
||||||
sys.path.append(os.path.dirname(os.path.abspath(__file__)))
|
sys.path.append(os.path.dirname(os.path.abspath(__file__)))
|
||||||
@@ -508,7 +509,9 @@ class TestBug839(TestCase):
|
|||||||
|
|
||||||
def test_recurrence_value_mapping(self):
|
def test_recurrence_value_mapping(self):
|
||||||
"""839: Verify that importing a legacy recurrence value is ok"""
|
"""839: Verify that importing a legacy recurrence value is ok"""
|
||||||
json = '{"description":"one","due":"1437579505","recur":"1m","status":"recurring","uuid":"ebeeab00-ccf8-464b-8b58-f7f2d606edfb"}'
|
# use a recent timestamp to avoid slowly iterating over thousands of minutes
|
||||||
|
justnow = int(time.time()) - 120
|
||||||
|
json = '{"description":"one","due":"%s","recur":"1m","status":"recurring","uuid":"ebeeab00-ccf8-464b-8b58-f7f2d606edfb"}' % justnow
|
||||||
self.t("import -", input=json)
|
self.t("import -", input=json)
|
||||||
|
|
||||||
code, out, err = self.t("list")
|
code, out, err = self.t("list")
|
||||||
|
|||||||
Reference in New Issue
Block a user