]> review.fuel-infra Code Review - openstack-build/cinder-build.git/commit
Add entity body validation helper
authorMark McLoughlin <markmc@redhat.com>
Wed, 12 Sep 2012 11:51:23 +0000 (12:51 +0100)
committerMark McLoughlin <markmc@redhat.com>
Thu, 13 Sep 2012 15:10:56 +0000 (16:10 +0100)
commit3dcb3fdba791639ab3fe7ab20b3398babcd27512
tree6473c55f6f2a1d3f956927720cc077238e7f72a6
parent24b3cd56967193e789564245352acecb4c80f767
Add entity body validation helper

Add a _valid_body() helper for the to avoid repeating the same tests in
multiple methods. Include a check that the entity itself is actually a
dict.

(Cherry-picks part of commit d1ad73ee from Nova)

Change-Id: If8114cc76d68567005c85c803f29e30e034db89a
cinder/api/openstack/wsgi.py
cinder/tests/api/openstack/test_wsgi.py