MCPcopy Index your code
hub / github.com/prometheus/client_python / test_pushadd

Method test_pushadd

tests/test_exposition.py:325–330  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

323 self.assertEqual(self.requests[0][1], b'# HELP g help\n# TYPE g gauge\ng 0.0\n')
324
325 def test_pushadd(self):
326 pushadd_to_gateway(self.address, "my_job", self.registry)
327 self.assertEqual(self.requests[0][0].command, 'POST')
328 self.assertEqual(self.requests[0][0].path, '/metrics/job/my_job')
329 self.assertEqual(self.requests[0][0].headers.get('content-type'), CONTENT_TYPE_PLAIN_0_0_4)
330 self.assertEqual(self.requests[0][1], b'# HELP g help\n# TYPE g gauge\ng 0.0\n')
331
332 def test_pushadd_with_groupingkey(self):
333 pushadd_to_gateway(self.address, "my_job", self.registry, {'a': 9})

Callers

nothing calls this directly

Calls 2

pushadd_to_gatewayFunction · 0.90
getMethod · 0.45

Tested by

no test coverage detected