bkjones/pyrabbit — pull request #19 by ianawilson (2013-12-07 20:23:37+00:00)
Title: Added tests and fix for empty queues occasionally omitting the 'messages' key

Sometimes, it seems, Rabbit will omit the `messages` key from `/api/queues/vhost/name` for empty queues.

I don't really understand this behavior, and its not documented in [RabbitMQ's HTTP API docs](http://hg.rabbitmq.com/rabbitmq-management/raw-file/rabbitmq_v2_8_1/priv/www/api/index.html), but I've observed it a few times, both with pyrabbit and with the Network tab of the Chrome Inspector while using the HTTP Management webui. Since their webui doesn't seem to mind its omission, I figured pyrabbit should also not mind this, and assume that the queue is empty when `messages` is not reported.