コード例 #1
0
    def test_on_failure(self):
        actor = lib.IRControlFrontend(self.config, None)
        actor.on_start()

        actor.on_failure()
        assert not actor.thread.isAlive()
コード例 #2
0
 def test_on_start_log_exception(self, mock_logger):
     actor = lib.IRControlFrontend(self.config, None)
     with patch('mopidy_IRControl.actor.LircThread.start') as MockMethod:
         MockMethod.side_effect = Exception('Boom!')
         actor.on_start()
         self.assertTrue(mock_logger.warning.called)
コード例 #3
0
 def test_on_start_should_spawn_thread(self):
     actor = lib.IRControlFrontend(self.config, None)
     actor.on_start()
     assert actor.thread is not None