def Consumer(self, hostname='*****@*****.**', pid=4312): c = Mock() c.app.connection = _amqp_connection() c.hostname = hostname c.pid = pid return c