diff options
Diffstat (limited to 'test/test_filt.py')
-rw-r--r-- | test/test_filt.py | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/test/test_filt.py b/test/test_filt.py index 452a4505..279f550f 100644 --- a/test/test_filt.py +++ b/test/test_filt.py @@ -171,9 +171,7 @@ class TestMatching: assert self.q("~hs 'header_response: svalue'", s) assert not self.q("~hs 'header: qvalue'", q) - def test_body(self): - q = self.req() - s = self.resp() + def match_body(self, q, s): assert not self.q("~b nonexistent", q) assert self.q("~b content", q) assert self.q("~b response", s) @@ -190,6 +188,16 @@ class TestMatching: assert not self.q("~bs response", q) assert self.q("~bs response", s) + def test_body(self): + q = self.req() + s = self.resp() + self.match_body(q, s) + + q.request.encode("gzip") + s.request.encode("gzip") + s.response.encode("gzip") + self.match_body(q, s) + def test_method(self): q = self.req() s = self.resp() |