(self)
| 131 | self.assert_metrics(output, metric_name, help_text, increments) |
| 132 | |
| 133 | async def test_gzip_disabled(self): |
| 134 | # Increment a metric. |
| 135 | metric_name = "counter" |
| 136 | help_text = "A counter" |
| 137 | increments = 2 |
| 138 | self.increment_metrics(metric_name, help_text, increments) |
| 139 | |
| 140 | async with self.client.get( |
| 141 | "/metrics_uncompressed", |
| 142 | auto_decompress=False, |
| 143 | headers={hdrs.ACCEPT_ENCODING: "gzip"}, |
| 144 | ) as response: |
| 145 | response.raise_for_status() |
| 146 | self.assertNotIn(hdrs.CONTENT_ENCODING, response.headers) |
| 147 | output = await response.text() |
| 148 | self.assert_metrics(output, metric_name, help_text, increments) |
| 149 | |
| 150 | async def test_openmetrics_encoding(self): |
| 151 | """Response content type is application/openmetrics-text when appropriate Accept header is in request""" |
nothing calls this directly
no test coverage detected