From: Derek Chiang Date: Wed, 22 May 2013 00:16:39 +0000 (+0000) Subject: Added test for nonnumerical limit param X-Git-Url: https://review.fuel-infra.org/gitweb?a=commitdiff_plain;h=960e7d37b15b9093378318197866525cbc810622;p=openstack-build%2Fcinder-build.git Added test for nonnumerical limit param Change-Id: Ie9ef0b2ddcf9945f4065e76fddba763470ffdb81 --- 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('/')