return
self.stubs.Set(glanceclient_v2, '_get_image_model',
- fake_get_image_model)
+ fake_get_model)
+
+ try:
+ self.stubs.Set(glanceclient_v2, '_get_member_model',
+ fake_get_model)
+ except AttributeError:
+ # method requires stubbing only with newer glanceclients.
+ pass
def test_glance_version_by_flag(self):
- """Test glance version set by flag is honoured"""
+ """Test glance version set by flag is honoured."""
client_wrapper_v1 = glance.GlanceClientWrapper('fake', 'fake_host',
9292)
self.assertEquals(client_wrapper_v1.client.__module__,