Example #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}')
Example #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}')
Example #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}')
Example #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}')