Skip to content

Commit

Permalink
Added test for BlinktBoard.black_all()
Browse files Browse the repository at this point in the history
  • Loading branch information
speratus committed Oct 30, 2019
1 parent 2a58200 commit dca770f
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -325,5 +325,19 @@ def test_stop_blink(self, mock_stop, mock_black):
mock_black.assert_called()


class BlinktBoardTests(unittest.TestCase):
def setUp(self) -> None:
self.board = BlinktBoard()

#@mock.patch.object(threading.Lock, 'acquire', autospec=True)
@mock.patch('blinkt.clear', autospec=True)
@mock.patch('blinkt.show', autospec=True)
def test_black_all(self, mock_show, mock_clear):
self.board.black_all()
mock_show.assert_called()
mock_clear.assert_called()
#mock_acquire.assert_called()


if __name__ == '__main__':
unittest.main()

0 comments on commit dca770f

Please sign in to comment.