WSGI app serves the metrics from the provided registry.
(self, metric_name, help_text, increments)
| 44 | self.assertIn(metric_name + "_total " + str(increments) + ".0\n", output) |
| 45 | |
| 46 | def validate_metrics(self, metric_name, help_text, increments): |
| 47 | """ |
| 48 | WSGI app serves the metrics from the provided registry. |
| 49 | """ |
| 50 | self.increment_metrics(metric_name, help_text, increments) |
| 51 | # Create and run WSGI app |
| 52 | app = make_wsgi_app(self.registry) |
| 53 | outputs = app(self.environ, self.capture) |
| 54 | # Assert outputs |
| 55 | self.assert_outputs(outputs, metric_name, help_text, increments, compressed=False) |
| 56 | |
| 57 | def test_report_metrics_1(self): |
| 58 | self.validate_metrics("counter", "A counter", 2) |
no test coverage detected