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

Method test_push_schemeless_url

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

Source from the content-addressed store, hash-verified

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)
285 self.assertEqual(self.requests[0][0].command, 'PUT')
286 self.assertEqual(self.requests[0][0].path, '/metrics/job/my_job')
287 self.assertEqual(self.requests[0][0].headers.get('content-type'), CONTENT_TYPE_PLAIN_0_0_4)
288 self.assertEqual(self.requests[0][1], b'# HELP g help\n# TYPE g gauge\ng 0.0\n')
289
290 def test_push_with_groupingkey(self):
291 push_to_gateway(self.address, "my_job", self.registry, {'a': 9})

Callers

nothing calls this directly

Calls 2

push_to_gatewayFunction · 0.90
getMethod · 0.45

Tested by

no test coverage detected