aboutsummaryrefslogtreecommitdiffstats
path: root/tests/test_step_timer.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/test_step_timer.py')
-rw-r--r--tests/test_step_timer.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/tests/test_step_timer.py b/tests/test_step_timer.py
index fe2d1c1..a116f8c 100644
--- a/tests/test_step_timer.py
+++ b/tests/test_step_timer.py
@@ -20,7 +20,6 @@
import json
import logging
-import sys
import time
from datetime import datetime
@@ -29,6 +28,7 @@ from policyhandler.step_timer import StepTimer
Config.load_from_file()
+
class MockTimer(object):
"""testing step_timer"""
logger = logging.getLogger("policy_handler.unit_test.step_timer")
@@ -131,9 +131,10 @@ class MockTimer(object):
str(self.status_ts), str(self.exe_ts)
)
if self.step_timer:
- return "{0}: {1}".format(status, self.step_timer.get_status())
+ return "{0}: {1}".format(status, self.step_timer.get_timer_status())
return status
+
def test_step_timer():
"""test step_timer"""
MockTimer.logger.info("============ test_step_timer =========")
@@ -161,6 +162,7 @@ def test_step_timer():
time.sleep(3 * step_timer.interval)
step_timer.verify_last_event()
+
def test_interrupt_step_timer():
"""test step_timer"""
MockTimer.logger.info("============ test_interrupt_step_timer =========")