Response content type is application/openmetrics-text when appropriate Accept header is in request
(self)
| 173 | self.assert_outputs(outputs, metric_name, help_text, increments, compressed=False) |
| 174 | |
| 175 | def test_openmetrics_encoding(self): |
| 176 | """Response content type is application/openmetrics-text when appropriate Accept header is in request""" |
| 177 | app = make_asgi_app(self.registry) |
| 178 | self.seed_app(app) |
| 179 | self.scope["headers"] = [(b"Accept", b"application/openmetrics-text; version=1.0.0")] |
| 180 | self.send_input({"type": "http.request", "body": b""}) |
| 181 | |
| 182 | content_type = self.get_response_header_value('Content-Type').split(";")[0] |
| 183 | assert content_type == "application/openmetrics-text" |
| 184 | |
| 185 | def test_plaintext_encoding(self): |
| 186 | """Response content type is text/plain when Accept header is missing in request""" |
nothing calls this directly
no test coverage detected