From cbb96bd57a2fa3fa5a0a11662ea4890a5ad9bc41 Mon Sep 17 00:00:00 2001 From: Jean-Paul Calderone Date: Thu, 23 Sep 2021 07:43:33 -0400 Subject: [PATCH] one more docstring --- src/allmydata/test/test_openmetrics.py | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/src/allmydata/test/test_openmetrics.py b/src/allmydata/test/test_openmetrics.py index a92098c88..385bf32a8 100644 --- a/src/allmydata/test/test_openmetrics.py +++ b/src/allmydata/test/test_openmetrics.py @@ -162,7 +162,20 @@ class OpenMetrics(SyncTestCase): self.assertThat(d, succeeded(matches_stats(self))) def matches_stats(testcase): + """ + Create a matcher that matches a response that confirms to the OpenMetrics + specification. + * The ``Content-Type`` is **application/openmetrics-text; version=1.0.0; charset=utf-8**. + * The status is **OK**. + * The body can be parsed by an OpenMetrics parser. + * The metric families in the body are grouped and sorted. + * At least one of the expected families appears in the body. + + :param testtools.TestCase testcase: The case to which to add detail about the matching process. + + :return: A matcher. + """ return MatchesAll( MatchesStructure( code=Equals(OK),