blob: d29f88b6b617149f90b7c210964ccdf405b883b1 [file] [log] [blame]
Wei-Yu Chenad55cb82022-02-15 20:07:01 +08001# SPDX-FileCopyrightText: 2020 The Magma Authors.
2# SPDX-FileCopyrightText: 2022 Open Networking Foundation <support@opennetworking.org>
3#
4# SPDX-License-Identifier: BSD-3-Clause
Wei-Yu Chen49950b92021-11-08 19:19:18 +08005
6# pylint: disable=protected-access
7from unittest import TestCase
8
9from state_machines.timer import StateMachineTimer
10
11
12class StateMachineTimerTests(TestCase):
13 def test_is_done(self):
14 timer_a = StateMachineTimer(0)
15 self.assertTrue(timer_a.is_done(), 'Timer should be done')
16
17 timer_b = StateMachineTimer(600)
18 self.assertFalse(timer_b.is_done(), 'Timer should not be done')