def test_dbmgr_get(self): mgr = fakes.FakeDatabaseManager() rsrc = fakes.FakeDatabaseInstance() rsrc.volume = {} mgr._get = Mock(return_value=rsrc) ret = mgr.get("fake") self.assertTrue(isinstance(ret, CloudDatabaseInstance)) self.assertTrue(isinstance(ret.volume, CloudDatabaseVolume))
def setUp(self): self.instance = fakes.FakeDatabaseInstance() self.client = fakes.FakeDatabaseClient()