Beispiel #1
0
    def test_should_adjust_right(self):
        render_state(yadtshell.settings.UP, width=6, just='right')

        self.mock_render.assert_called_with('${GREEN}${BOLD}    up${NORMAL}')
Beispiel #2
0
    def test_should_render_green_when_state_is_up(self):
        render_state(yadtshell.settings.UP, width=0)

        self.mock_render.assert_called_with('${GREEN}${BOLD}up${NORMAL}')
Beispiel #3
0
    def test_should_adjust_left_by_default(self):
        render_state(yadtshell.settings.UP, width=4)

        self.mock_render.assert_called_with('${GREEN}${BOLD}up  ${NORMAL}')
Beispiel #4
0
    def test_should_render_red_when_state_is_down(self):
        render_state(yadtshell.settings.DOWN, width=0)

        self.mock_render.assert_called_with('${RED}${BOLD}down${NORMAL}')