示例#1
0
 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))
示例#2
0
 def setUp(self):
     self.instance = fakes.FakeDatabaseInstance()
     self.client = fakes.FakeDatabaseClient()