Skip to content

Commit

Permalink
More spacing test fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
tw4l committed Apr 1, 2024
1 parent 3b554fb commit 7b5544d
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
4 changes: 2 additions & 2 deletions pywb/recorder/test/test_recorder.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down Expand Up @@ -542,7 +542,7 @@ def test_record_multiple_writes_rollover_idle(self):
'/get?goo=bar', '&param.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)

Expand Down
6 changes: 3 additions & 3 deletions pywb/warcserver/test/test_handlers.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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

Expand Down Expand Up @@ -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']
Expand Down
8 changes: 4 additions & 4 deletions tests/test_live_rewriter.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,14 +76,14 @@ def test_live_live_post(self, fmod_sl):
resp = self.post('/live/{0}httpbin.org/post', fmod_sl, {'foo': 'bar', 'test': 'abc'})
assert resp.status_int == 200
resp.charset = 'utf-8'
assert '"foo" :"bar"' in resp.text
assert '"test" :"abc"' in resp.text
assert '"foo": "bar"' in resp.text
assert '"test": "abc"' in resp.text
assert resp.status_int == 200

def test_live_anchor_encode(self, fmod_sl):
resp = self.get('/live/{0}httpbin.org/get?val=abc%23%23xyz', fmod_sl)
assert 'get?val=abc%23%23xyz"' in resp.text
assert '"val" :"abc##xyz"' in resp.text
assert '"val": "abc##xyz"' in resp.text
#assert '"http://httpbin.org/anything/abc##xyz"' in resp.text
assert resp.status_int == 200

Expand Down Expand Up @@ -181,7 +181,7 @@ def test_live_video_info(self):

def test_deflate(self, fmod_sl):
resp = self.get('/live/{0}http://httpbin.org/deflate', fmod_sl)
assert b'"deflated" :true' in resp.body
assert b'"deflated": true' in resp.body

def test_live_origin_and_referrer(self, fmod_sl):
headers = {'Referer': 'http://localhost:80/live/{0}http://example.com/test'.format(fmod_sl),
Expand Down

0 comments on commit 7b5544d

Please sign in to comment.