2
from pomodoro-indicator.pomodoro_state import PomodoroState
4
class TestPomodoroState(unittest.TestCase):
7
self.state = PomodoroState()
9
def test_has_all_the_methods(self):
10
"""There a list of methods it has to have but do nothing"""
11
methods_list = ["enabled_buttons", "start", "next_state", "pause", "resume"]
12
for method in methods_list:
13
assert hasattr(self.state, method)
15
def test_should_not_be_on_any_state(self):
16
"""The super class should not be on any singular state"""
17
states = ["working", "resting", "paused", "waiting"]
19
method = getattr(self.state, state)
20
self.assertFalse(method())
22
def test_current_state(self):
23
"""Every state should have a name and this method provides it"""
24
self.state.name = "name"
25
self.assertEqual("name", self.state.current_state())
27
def test_wont_work(self):
28
self.assertFalse(True)
30
if __name__ == '__main__':