diff options
Diffstat (limited to 'pecan/tests/test_base.py')
-rw-r--r-- | pecan/tests/test_base.py | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/pecan/tests/test_base.py b/pecan/tests/test_base.py index 6332392..e9f6af2 100644 --- a/pecan/tests/test_base.py +++ b/pecan/tests/test_base.py @@ -462,6 +462,16 @@ class TestControllerArguments(PecanTestCase): assert r.status_int == 200 assert r.body == b_('index: This is a test!') + def test_single_argument_with_plus(self): + r = self.app_.get('/foo+bar') + assert r.status_int == 200 + assert r.body == b_('index: foo+bar') + + def test_single_argument_with_encoded_plus(self): + r = self.app_.get('/foo%2Bbar') + assert r.status_int == 200 + assert r.body == b_('index: foo+bar') + def test_two_arguments(self): r = self.app_.get('/1/dummy', status=404) assert r.status_int == 404 @@ -476,6 +486,16 @@ class TestControllerArguments(PecanTestCase): assert r.status_int == 200 assert r.body == b_('index: This is a test!') + def test_keyword_argument_with_plus(self): + r = self.app_.get('/?id=foo+bar') + assert r.status_int == 200 + assert r.body == b_('index: foo bar') + + def test_keyword_argument_with_encoded_plus(self): + r = self.app_.get('/?id=foo%2Bbar') + assert r.status_int == 200 + assert r.body == b_('index: foo+bar') + def test_argument_and_keyword_argument(self): r = self.app_.get('/3?id=three') assert r.status_int == 200 |