本文整理汇总了Python中DataManager.DataManager.pull方法的典型用法代码示例。如果您正苦于以下问题:Python DataManager.pull方法的具体用法?Python DataManager.pull怎么用?Python DataManager.pull使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类DataManager.DataManager
的用法示例。
在下文中一共展示了DataManager.pull方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: Test_2_DataManagerSyncStart
# 需要导入模块: from DataManager import DataManager [as 别名]
# 或者: from DataManager.DataManager import pull [as 别名]
class Test_2_DataManagerSyncStart(unittest.TestCase):
def setUp(self):
self.af = FeedRef((FeatureType.ADDRESS,FeedType.FEATURES))
self.ac = FeedRef((FeatureType.ADDRESS,FeedType.CHANGEFEED))
self.ar = FeedRef((FeatureType.ADDRESS,FeedType.RESOLUTIONFEED))
self.aff = FeatureFactory.getInstance(self.af)
self.afc = FeatureFactory.getInstance(self.ac)
self.afr = FeatureFactory.getInstance(self.ar)
self.dm = DataManager()
def tearDown(self):
self.dm.close()
del self.afr
del self.afc
del self.aff
def test10_validdatastoreTest(self):
'''Tests whether a valid address object is returned on json decoded arg'''
initdata = self.dm.pull()
self.assertEquals(len(initdata),5,'Invalid ADL list length returned')
def test20_refreshTest(self):
'''Tests whether a valid address object is returned on json decoded arg'''
initdata = self.dm.pull()
self.assertTrue(isinstance(initdata[self.af][0],Address),'Invalid address type returned')
self.assertTrue(isinstance(initdata[self.ac][0],AddressChange),'Invalid address type returned')
self.assertTrue(isinstance(initdata[self.ar][0],AddressResolution),'Invalid address type returned')
def test30_refreshTest(self):
pass
def test40_refreshTest(self):
pass