예제 #1
0
  def test_telnetrmq_before_execute(self, mocked):
    """ Test that the call to before_execute call superclass before_execute"""
    agentconf={}
    telnetconf={"host":"telnet.lan"}
    rmqconf={"host":"rmq.lan"}
    agent=TelnetRmqAgent(agentconf, telnetconf, rmqconf)

    #Setup generic mock for others methos wich are not tested here
    ignoredmocks=Mock()
    agent.telnetclient=ignoredmocks
    agent.rmqclient=ignoredmocks
    

    instance = mocked.return_value 
    agent.before_execute()
    mocked.assert_called_with(agent)