From 1b42f5ab1f3e22c760d155c7e3dea283032a517e Mon Sep 17 00:00:00 2001 From: Aldo Cortesi Date: Fri, 29 Jun 2012 10:42:15 +1200 Subject: Allow naked literals for path specification. --- test/test_rparse.py | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'test/test_rparse.py') diff --git a/test/test_rparse.py b/test/test_rparse.py index 9f330f51..cb1076c2 100644 --- a/test/test_rparse.py +++ b/test/test_rparse.py @@ -42,6 +42,10 @@ class TestMisc: assert v.expr() assert str(v) + def test_valuenakedliteral(self): + v = rparse.ValueNakedLiteral("foo") + assert v.expr() + def test_file_value(self): v = rparse.Value.parseString("<'one two'")[0] assert str(v) @@ -200,6 +204,10 @@ class TestParseRequest: r = rparse.parse_request({}, 'GET:"/foo"') assert r.method == "GET" assert r.path == "/foo" + r = rparse.parse_request({}, 'GET:/foo') + assert r.path == "/foo" + r = rparse.parse_request({}, 'GET:@1k') + assert len(r.path) == 1024 def test_render(self): s = cStringIO.StringIO() -- cgit v1.2.3