From 960e7d37b15b9093378318197866525cbc810622 Mon Sep 17 00:00:00 2001 From: Derek Chiang Date: Wed, 22 May 2013 00:16:39 +0000 Subject: [PATCH] Added test for nonnumerical limit param Change-Id: Ie9ef0b2ddcf9945f4065e76fddba763470ffdb81 --- cinder/tests/api/test_common.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/cinder/tests/api/test_common.py b/cinder/tests/api/test_common.py index bcea2befc..f6bdec94c 100644 --- a/cinder/tests/api/test_common.py +++ b/cinder/tests/api/test_common.py @@ -161,6 +161,12 @@ class PaginationParamsTest(test.TestCase): GET params. """ + def test_nonnumerical_limit(self): + """ Test nonnumerical limit param. """ + req = webob.Request.blank('/?limit=hello') + self.assertRaises( + webob.exc.HTTPBadRequest, common.get_pagination_params, req) + def test_no_params(self): """ Test no params. """ req = webob.Request.blank('/') -- 2.45.2