aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/test_app.py8
-rw-r--r--test/test_language.py2
-rw-r--r--test/test_pathod.py2
3 files changed, 8 insertions, 4 deletions
diff --git a/test/test_app.py b/test/test_app.py
index 7b2451d6..b3194052 100644
--- a/test/test_app.py
+++ b/test/test_app.py
@@ -47,9 +47,13 @@ class TestApp(tutils.DaemonTests):
assert r.status_code == 200
assert 'Response' in r.content
- r = self.getpath("/response_preview", params=dict(spec="200:b<foo"))
+ r = self.getpath("/response_preview", params=dict(spec="200:b<nonexistent"))
assert r.status_code == 200
- assert 'File access is disabled' in r.content
+ assert 'File access denied' in r.content
+
+ r = self.getpath("/response_preview", params=dict(spec="200:b<file"))
+ assert r.status_code == 200
+ assert 'testfile' in r.content
def test_request_preview(self):
r = self.getpath("/request_preview", params=dict(spec="get:/"))
diff --git a/test/test_language.py b/test/test_language.py
index e5ec51d2..54f96d51 100644
--- a/test/test_language.py
+++ b/test/test_language.py
@@ -508,7 +508,7 @@ class TestResponse:
r = language.parse_response({}, "400'msg':b@100b")
assert r.msg == "msg"
- assert r.body[:]
+ assert r.body.values({})
assert str(r)
def test_render(self):
diff --git a/test/test_pathod.py b/test/test_pathod.py
index 195c7333..83f57727 100644
--- a/test/test_pathod.py
+++ b/test/test_pathod.py
@@ -141,7 +141,7 @@ class CommonTests(tutils.DaemonTests):
def test_source_access_denied(self):
rsp = self.get("200:b</foo")
assert rsp.status_code == 800
- assert "Access Denied" in rsp.content
+ assert "File access denied" in rsp.content
class TestDaemon(CommonTests):