diff --git a/pywb/recorder/test/test_recorder.py b/pywb/recorder/test/test_recorder.py index 6cc6e8895..60f337b06 100644 --- a/pywb/recorder/test/test_recorder.py +++ b/pywb/recorder/test/test_recorder.py @@ -150,7 +150,7 @@ def test_record_warc_1(self): resp = self._test_warc_write(recorder_app, 'httpbin.org', '/get?foo=bar') assert b'HTTP/1.1 200 OK' in resp.body - assert b'"foo": "bar"' in resp.body + assert b'"foo":"bar"' in resp.body self._test_all_warcs('/warcs/', 1) @@ -160,7 +160,7 @@ def test_record_warc_2(self): resp = self._test_warc_write(recorder_app, 'httpbin.org', '/get?foo=bar') assert b'HTTP/1.1 200 OK' in resp.body - assert b'"foo": "bar"' in resp.body + assert b'"foo":"bar"' in resp.body self._test_all_warcs('/warcs/', 2) @@ -262,7 +262,7 @@ def test_record_skip_wrong_coll(self): resp = self._test_warc_write(recorder_app, 'httpbin.org', '/get?foo=bar') assert b'HTTP/1.1 200 OK' in resp.body - assert b'"foo": "bar"' in resp.body + assert b'"foo":"bar"' in resp.body self._test_all_warcs('/warcs/', 2) @@ -279,7 +279,7 @@ def test_record_param_user_coll(self): resp = self._test_warc_write(recorder_app, 'httpbin.org', '/user-agent', '¶m.recorder.user=USER¶m.recorder.coll=COLL') - assert '"user-agent": "{0}"'.format(UA) in resp.text + assert '"user-agent":"{0}"'.format(UA) in resp.text #assert b'HTTP/1.1 200 OK' in resp.body #assert b'"foo": "bar"' in resp.body @@ -312,12 +312,12 @@ def test_record_param_user_coll_same_dir(self): resp = self._test_warc_write(recorder_app, 'httpbin.org', '/get?foo=bar', '¶m.recorder.user=USER2¶m.recorder.coll=COLL2') assert b'HTTP/1.1 200 OK' in resp.body - assert b'"foo": "bar"' in resp.body + assert b'"foo":"bar"' in resp.body resp = self._test_warc_write(recorder_app, 'httpbin.org', '/get?foo=bar', '¶m.recorder.user=USER2¶m.recorder.coll=COLL3') assert b'HTTP/1.1 200 OK' in resp.body - assert b'"foo": "bar"' in resp.body + assert b'"foo":"bar"' in resp.body self._test_all_warcs('/warcs2', 2) @@ -334,7 +334,7 @@ def test_record_param_user_coll_revisit(self): resp = self._test_warc_write(recorder_app, 'httpbin.org', '/user-agent', '¶m.recorder.user=USER¶m.recorder.coll=COLL') - assert '"user-agent": "{0}"'.format(UA) in resp.text + assert '"user-agent":"{0}"'.format(UA) in resp.text #assert b'HTTP/1.1 200 OK' in resp.body #assert b'"foo": "bar"' in resp.body @@ -387,7 +387,7 @@ def test_record_param_user_coll_skip(self): resp = self._test_warc_write(recorder_app, 'httpbin.org', '/user-agent', '¶m.recorder.user=USER¶m.recorder.coll=COLL') - assert '"user-agent": "{0}"'.format(UA) in resp.text + assert '"user-agent":"{0}"'.format(UA) in resp.text #assert b'HTTP/1.1 200 OK' in resp.body #assert b'"foo": "bar"' in resp.body self._test_all_warcs('/warcs/USER/COLL/', 2) @@ -409,7 +409,7 @@ def test_record_param_user_coll_write_dupe_no_revisit(self): resp = self._test_warc_write(recorder_app, 'httpbin.org', '/get?foo=bar', '¶m.recorder.user=USER¶m.recorder.coll=COLL') assert b'HTTP/1.1 200 OK' in resp.body - assert b'"foo": "bar"' in resp.body + assert b'"foo":"bar"' in resp.body self._test_all_warcs('/warcs/USER/COLL/', 3) @@ -432,7 +432,7 @@ def test_record_file_warc_keep_open(self): resp = self._test_warc_write(recorder_app, 'httpbin.org', '/get?foo=bar') assert b'HTTP/1.1 200 OK' in resp.body - assert b'"foo": "bar"' in resp.body + assert b'"foo":"bar"' in resp.body assert os.path.isfile(path) assert len(writer.fh_cache) == 1 @@ -455,7 +455,7 @@ def test_record_multiple_writes_keep_open(self): '/get?foo=bar', '¶m.recorder.coll=FOO') assert b'HTTP/1.1 200 OK' in resp.body - assert b'"foo": "bar"' in resp.body + assert b'"foo":"bar"' in resp.body # Second Record @@ -463,7 +463,7 @@ def test_record_multiple_writes_keep_open(self): '/get?boo=far', '¶m.recorder.coll=FOO') assert b'HTTP/1.1 200 OK' in resp.body - assert b'"boo": "far"' in resp.body + assert b'"boo":"far"' in resp.body self._test_all_warcs('/warcs/FOO/', 1) @@ -523,14 +523,14 @@ def test_record_multiple_writes_rollover_idle(self): '/get?foo=bar', '¶m.recorder.coll=GOO') assert b'HTTP/1.1 200 OK' in resp.body - assert b'"foo": "bar"' in resp.body + assert b'"foo":"bar"' in resp.body # Second Record resp = self._test_warc_write(recorder_app, 'httpbin.org', '/get?boo=far', '¶m.recorder.coll=GOO') assert b'HTTP/1.1 200 OK' in resp.body - assert b'"boo": "far"' in resp.body + assert b'"boo":"far"' in resp.body self._test_all_warcs('/warcs/GOO/', 1) @@ -542,7 +542,7 @@ def test_record_multiple_writes_rollover_idle(self): '/get?goo=bar', '¶m.recorder.coll=GOO') assert b'HTTP/1.1 200 OK' in resp.body - assert b'"goo": "bar"' in resp.body + assert b'"goo":"bar"' in resp.body self._test_all_warcs('/warcs/GOO/', 2) diff --git a/pywb/warcserver/test/test_handlers.py b/pywb/warcserver/test/test_handlers.py index 74a4a0a94..ee8be49f1 100644 --- a/pywb/warcserver/test/test_handlers.py +++ b/pywb/warcserver/test/test_handlers.py @@ -162,7 +162,7 @@ def test_live_resource(self): assert resp.headers['Memento-Datetime'] != '' assert b'HTTP/1.1 200 OK' in resp.body - assert b'"foo": "bar"' in resp.body + assert b'"foo":"bar"' in resp.body assert 'ResErrors' not in resp.headers @@ -178,7 +178,7 @@ def test_live_post_resource(self): assert resp.headers['Memento-Datetime'] != '' assert b'HTTP/1.1 200 OK' in resp.body - assert b'"foo": "bar"' in resp.body + assert b'"foo":"bar"' in resp.body assert 'ResErrors' not in resp.headers @@ -288,7 +288,7 @@ def test_agg_live_postreq(self): assert resp.headers['Memento-Datetime'] != '' assert b'HTTP/1.1 200 OK' in resp.body - assert b'"foo": "bar"' in resp.body + assert b'"foo":"bar"' in resp.body #assert json.loads(resp.headers['ResErrors']) == {"rhiz": "NotFoundException('https://webenact.rhizome.org/vvork/http://httpbin.org/get?foo=bar',)"} assert "NotFoundException('https://webenact.rhizome.org/vvork/" in json.loads(resp.headers['ResErrors'])['rhiz'] diff --git a/test_requirements.txt b/test_requirements.txt index ad49ac48a..e24a78680 100644 --- a/test_requirements.txt +++ b/test_requirements.txt @@ -6,4 +6,4 @@ urllib3 flask ujson lxml -httpbin @ git+https://github.com/aaronhmiller/httpbin.git +httpbin