'Test getting the number of messages in a queue specified by
name and returning them.'

def test_size(self):

    message_count = 5
    mock_queue = Mock()
    mock_queue_to_check = Mock()
    mock_queue_to_check.values = {u'msgDepth': message_count}
    self.mock_broker.getQueue.return_value = mock_queue_to_check
    result = self.my_channel._size(mock_queue)
    self.mock_broker.getQueue.assert_called_with(mock_queue)
    assert (message_count == result)
