コード例 #1
0
    def test_headers(self):
        f = BinaryFormatter()
        result = {
            'Content-Type':
            'application/vnd.google.protobuf; proto=io.prometheus.client.MetricFamily; encoding=delimited'
        }

        self.assertEqual(result, f.get_headers())
コード例 #2
0
 def test_headers_binary(self):
     """ check binary header info is provided """
     f = BinaryFormatter()
     expected_result = {"Content-Type": BINARY_CONTENT_TYPE}
     self.assertEqual(expected_result, f.get_headers())