moto/tests/test_swf/models/test_timeout.py
Ian Fillion-de Kiewit 129b4faff8 Fix style issues
2016-02-02 14:02:37 -05:00

19 lines
462 B
Python

from freezegun import freeze_time
from moto.swf.models import Timeout
from ..utils import make_workflow_execution
def test_timeout_creation():
wfe = make_workflow_execution()
# epoch 1420113600 == "2015-01-01 13:00:00"
timeout = Timeout(wfe, 1420117200, "START_TO_CLOSE")
with freeze_time("2015-01-01 12:00:00"):
timeout.reached.should.be.falsy
with freeze_time("2015-01-01 13:00:00"):
timeout.reached.should.be.truthy