'Tests poll using the protobuf format'

@patch('requests.get')
def test_poll_protobuf(self, mock_get):

    mock_get.return_value = MagicMock(status_code=200, content=self.bin_data, headers={'Content-Type': self.protobuf_content_type})
    (ct, data) = self.check.poll('http://fake.endpoint:10055/metrics')
    messages = list(self.check.parse_metric_family(data, ct))
    self.assertEqual(len(messages), 61)
    self.assertEqual(messages[(-1)].name, 'process_virtual_memory_bytes')
