def test_create_volume(self): mgr = fakes.FakeManager() mgr.api.region_name = "FAKE" sav = pyrax.connect_to_cloudservers fakenovavol = utils.random_unicode() class FakeVol(object): def __init__(self, *args, **kwargs): self.volumes = fakenovavol pyrax.connect_to_cloudservers = Mock(return_value=FakeVol()) vol = CloudBlockStorageVolume(mgr, {}) self.assertTrue(isinstance(vol, CloudBlockStorageVolume)) self.assertEqual(vol._nova_volumes, fakenovavol) pyrax.connect_to_cloudservers = sav
def test_create_volume(self): vol = CloudBlockStorageVolume(fakes.FakeManager(), {}) self.assertTrue(isinstance(vol, CloudBlockStorageVolume))