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

Method test_push

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

Source from the content-addressed store, hash-verified

274
275
276 def test_push(self):
277 push_to_gateway(self.address, "my_job", self.registry)
278 self.assertEqual(self.requests[0][0].command, 'PUT')
279 self.assertEqual(self.requests[0][0].path, '/metrics/job/my_job')
280 self.assertEqual(self.requests[0][0].headers.get('content-type'), CONTENT_TYPE_PLAIN_0_0_4)
281 self.assertEqual(self.requests[0][1], b'# HELP g help\n# TYPE g gauge\ng 0.0\n')
282
283 def test_push_schemeless_url(self):
284 push_to_gateway(self.address.replace('http://', ''), "my_job", self.registry)

Callers

nothing calls this directly

Calls 2

push_to_gatewayFunction · 0.90
getMethod · 0.45

Tested by

no test coverage detected