[openstack-dev] help with python-cinderclient unit test

Chris Buccella buccella at linux.vnet.ibm.com
Wed Feb 19 06:07:20 UTC 2014


On 02/18/2014 04:31 PM, Luis de Bethencourt wrote:
>
>
> I am finishing a patch that Seif Lofty started. It shows more 
> information for the quota-usage health.
>
> https://review.openstack.org/gitweb?p=openstack%2Fpython-cinderclient.git;a=commitdiff;h=785cae3a17fbeccb366b01ece8f8704edf4d2ae7
>
> I am not sure how the unit test for this should work.
> I've tried to add...
>
>     def test_quota_usage_show(self):
>         self.run_command('quota-usage demo')
>
> at the end of cinder/tests/v1/test_shell.py, and when running tox I get:
>
> AssertionError: Called unknown API method: GET 
> /os-quota-sets/demo?usage=True, expected fakes method name: 
> get_os_quota_sets_demo
>
> Any ideas or suggestions?
>
>

I haven't looked at this in detail, but here's a general suggestion:

The unit tests run independently from cinder. So you'll need to make 
sure that whatever changes were made on the server side are faked some 
way in the unit test suite. Look at the backtrace you received and 
you'll find cinderclient/tests/v1/fakes.py is where the call is failing. 
Start looking there.


-Chris (hdd)




More information about the OpenStack-dev mailing list