]> review.fuel-infra Code Review - openstack-build/cinder-build.git/commit
Mock glance client object in version unit tests
authorRushi Agrawal <rushi.agr@gmail.com>
Sun, 7 Sep 2014 18:58:57 +0000 (00:28 +0530)
committerRushi Agrawal <rushi.agr@gmail.com>
Sun, 7 Sep 2014 19:05:44 +0000 (00:35 +0530)
commit04abab869d28e007d9b869122740f70cd839daf7
tree048e39e1fc3d0b5797483e84c3b2f3e97e7f5d19
parentbee98cd04f42d46b3348c390421d2463f9966110
Mock glance client object in version unit tests

This patch changes the glance client version unit tests
to mock the Client object completely.  Previously the
tests were ensuring the right version of the client was
returned, but that required too much knowledge of glance's
implementation and ended up breaking the tests when glance
changed the implementation details of the Client class.

The new code tests if cinder is calling the integration
point correctly for the version, rather than if glance
is correctly returning the right client; that should be
a glance test, not a cinder test.

Closes-Bug: 1366596
Change-Id: I979175e6c3b5f98076bde6d36ca52fb8b03009b8
cinder/tests/image/test_glance.py