cr-connect-workflow/tests/scripts/test_get_localtime.py

18 lines
530 B
Python

from tests.base_test import BaseTest
from crc.scripts.get_localtime import GetLocaltime
class TestGetLocaltime(BaseTest):
def test_get_localtime(self):
self.load_example_data()
workflow = self.create_workflow('get_localtime')
workflow_api = self.get_workflow_api(workflow)
task = workflow_api.next_task
timestamp = task.data['timestamp']
localtime = task.data['localtime']
self.assertEqual(localtime, GetLocaltime().do_task(None, None, None, timestamp=timestamp))