From a91cfd9506d2c9d6692f0535871e17ce41337b64 Mon Sep 17 00:00:00 2001 From: Tessa Walsh Date: Thu, 28 Mar 2024 14:47:51 -0400 Subject: [PATCH] Move asserts --- pywb/warcserver/test/test_inputreq.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/pywb/warcserver/test/test_inputreq.py b/pywb/warcserver/test/test_inputreq.py index b3bc2de1..28fab652 100644 --- a/pywb/warcserver/test/test_inputreq.py +++ b/pywb/warcserver/test/test_inputreq.py @@ -41,11 +41,10 @@ def __call__(self, environ, start_response): class TestInputReq(object): def setup(self): self.app = InputReqApp() - assert self.app self.testapp = webtest.TestApp(self.app) - assert self.testapp def test_get_direct(self): + assert self.testapp res = self.testapp.get('/test/http://example.com/', headers={'Foo': 'Bar'}) assert res.text == '\ GET /test/http://example.com/ HTTP/1.0\r\n\ @@ -55,6 +54,7 @@ def test_get_direct(self): ' def test_post_direct(self): + assert self.testapp res = self.testapp.post('/test/http://example.com/', headers={'Foo': 'Bar'}, params='ABC') lines = res.text.split('\r\n') assert lines[0] == 'POST /test/http://example.com/ HTTP/1.0' @@ -71,6 +71,7 @@ def test_post_req(self): Foo: Bar\r\n\ \r\n\ ' + assert self.testapp res = self.testapp.post('/test-postreq?url=http://example.com/', params=postdata) assert res.text == '\