diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/test_app.py | 4 | ||||
-rw-r--r-- | test/test_utils.py | 8 |
2 files changed, 12 insertions, 0 deletions
diff --git a/test/test_app.py b/test/test_app.py index 84d2e8e5..0b406ee0 100644 --- a/test/test_app.py +++ b/test/test_app.py @@ -34,4 +34,8 @@ class TestApp(tutils.DaemonTests): assert r.status_code == 200 assert "too large" in r.content + r = self.getpath("/preview", params=dict(spec="200:b@5k")) + assert r.status_code == 200 + assert 'Response' in r.content + diff --git a/test/test_utils.py b/test/test_utils.py index 8ca2da49..a8f513f8 100644 --- a/test/test_utils.py +++ b/test/test_utils.py @@ -15,3 +15,11 @@ def test_parse_anchor_spec(): def test_data_path(): tutils.raises(ValueError, utils.data.path, "nonexistent") + + +def test_escape_unprintables(): + s = "".join([chr(i) for i in range(255)]) + e = utils.escape_unprintables(s) + assert e.encode('ascii') + assert not "PATHOD_MARKER" in e + |