(self)
| 85 | self.assertEqual(mock.call_count, 1) |
| 86 | |
| 87 | def test_gzip(self): |
| 88 | # Increment a metric |
| 89 | metric_name = "counter" |
| 90 | help_text = "A counter" |
| 91 | increments = 2 |
| 92 | self.increment_metrics(metric_name, help_text, increments) |
| 93 | app = make_wsgi_app(self.registry) |
| 94 | # Try accessing metrics using the gzip Accept-Content header. |
| 95 | gzip_environ = dict(self.environ) |
| 96 | gzip_environ['HTTP_ACCEPT_ENCODING'] = 'gzip' |
| 97 | outputs = app(gzip_environ, self.capture) |
| 98 | # Assert outputs are compressed. |
| 99 | self.assert_outputs(outputs, metric_name, help_text, increments, compressed=True) |
| 100 | |
| 101 | def test_gzip_disabled(self): |
| 102 | # Increment a metric |
nothing calls this directly
no test coverage detected