def test_xbmcrmq_agent_xbmcclient(self): """ Test that the xbmcclient accessor returns the xbmc.client instance """ agentconf={} xbmcconf={"host":"xbmc.lan"} rmqconf={"host":"rmq.lan"} agent=XbmcRmqAgent(agentconf, xbmcconf, rmqconf) self.assertTrue(agent.xbmc.client == agent.xbmcclient())
def test_xbmcrmq_before_execute(self, mocked): """ Test that the call to before_execute call superclass before_execute""" agentconf={} xbmcconf={"host":"xbmc.lan"} rmqconf={"host":"rmq.lan"} agent=XbmcRmqAgent(agentconf, xbmcconf, rmqconf) #Setup generic mock for others methos wich are not tested here ignoredmocks=Mock() agent.xbmc=ignoredmocks agent.rmqclient=ignoredmocks instance = mocked.return_value agent.before_execute() mocked.assert_called_with(agent)