def test_start(self): c = Mock() agent = Agent(c) agent.instantiate = Mock() agent.agent_cls = 'foo:Agent' self.assertIsNotNone(agent.create(c)) agent.instantiate.assert_called_with(agent.agent_cls, c.connection)