(self)
| 99 | self.assert_outputs(outputs, metric_name, help_text, increments, compressed=True) |
| 100 | |
| 101 | def test_gzip_disabled(self): |
| 102 | # Increment a metric |
| 103 | metric_name = "counter" |
| 104 | help_text = "A counter" |
| 105 | increments = 2 |
| 106 | self.increment_metrics(metric_name, help_text, increments) |
| 107 | # Disable compression explicitly. |
| 108 | app = make_wsgi_app(self.registry, disable_compression=True) |
| 109 | # Try accessing metrics using the gzip Accept-Content header. |
| 110 | gzip_environ = dict(self.environ) |
| 111 | gzip_environ['HTTP_ACCEPT_ENCODING'] = 'gzip' |
| 112 | outputs = app(gzip_environ, self.capture) |
| 113 | # Assert outputs are not compressed. |
| 114 | self.assert_outputs(outputs, metric_name, help_text, increments, compressed=False) |
nothing calls this directly
no test coverage detected