本文整理汇总了Python中DataManager.DataManager.retireAddress方法的典型用法代码示例。如果您正苦于以下问题:Python DataManager.retireAddress方法的具体用法?Python DataManager.retireAddress怎么用?Python DataManager.retireAddress使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类DataManager.DataManager
的用法示例。
在下文中一共展示了DataManager.retireAddress方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: Test_6_DataManagerResolutionFeed
# 需要导入模块: from DataManager import DataManager [as 别名]
# 或者: from DataManager.DataManager import retireAddress [as 别名]
class Test_6_DataManagerResolutionFeed(unittest.TestCase):
ver = 1000000
def setUp(self):
self.dm = DataManager(ref_int)
self.af = FeedRef((FeatureType.ADDRESS,FeedType.FEATURES))
self.ac = FeedRef((FeatureType.ADDRESS,FeedType.CHANGEFEED))
self.ar = FeedRef((FeatureType.ADDRESS,FeedType.RESOLUTIONFEED))
self.afc = FeatureFactory.getInstance(self.ac)
self.afr = FeatureFactory.getInstance(self.ar)
self.addr_r = _getTestAddress(af[FeedType.FEATURES])
def tearDown(self):
self.dm.close()
del self.addr_f
def test10_cast(self):
addr_c = self.afc.cast(addr_f)
addr_r = self.afr.cast(addr_f)
def test20_accept(self):
addr_c = self.afc.cast(addr_f)
addr_c.setVersion(ver)
self.dm.addAddress(addr_c)
resp = None
while not resp:
resp = self.dm.response()
for r in resp:
self.assertTrue(isinstance(Address,r))
time.sleep(5)
def test30_update(self):
addr_c = self.afc.cast(addr_f)
addr_c.setFullAddress('Unit 1, 1000 Islay Street, Glenorchy')
addr_c.setVersion(ver)
self.dm.updateAddress(addr_c)
resp = None
while not resp:
resp = self.dm.response()
for r in resp:
self.assertTrue(isinstance(Address,r))
time.sleep(5)
def test30_reject(self):
addr_c = self.afc.cast(addr_f)
addr_c.setVersion(ver)
self.dm.retireAddress(addr_c)
resp = None
while not resp:
resp = self.dm.response()
for r in resp:
self.assertTrue(isinstance(Address,r))
time.sleep(5)