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

Method assert_outputs

tests/test_aiohttp.py:74–86  ·  view source on GitHub ↗
(
        self,
        response: ClientResponse,
        metric_name: str,
        help_text: str,
        increments: int,
    )

Source from the content-addressed store, hash-verified

72 self.assertNotIn(metric_name + "_total " + str(increments) + ".0\n", output)
73
74 async def assert_outputs(
75 self,
76 response: ClientResponse,
77 metric_name: str,
78 help_text: str,
79 increments: int,
80 ) -> None:
81 self.assertIn(
82 CONTENT_TYPE_PLAIN_0_0_4,
83 response.headers.getall(hdrs.CONTENT_TYPE),
84 )
85 output = await response.text()
86 self.assert_metrics(output, metric_name, help_text, increments)
87
88 async def validate_metrics(
89 self,

Callers 1

validate_metricsMethod · 0.95

Calls 2

assert_metricsMethod · 0.95
textMethod · 0.45

Tested by

no test coverage detected