def test_202_weblist(self): u"""添加单个IP或域名有效性检查""" webdics={}#存放字典,将url\title放入字典对应 url,title = network_control.data.rand_get_network() webdics.setdefault(url,title) wifidog_business.add_weblist(self,webdics.keys()) result = network_control.network(self,url,title) assert result,u"添加单个IP或域名有效性检查失败"
def test_203_weblist(self): webdics={}#存放字典,将url\title放入字典对应 u"""添加多个IP或域名有效性检查""" for i in range(3): url,title = network_control.data.rand_get_network() webdics.setdefault(url,title) wifidog_business.add_weblist(self,webdics.keys()) for (i,j) in webdics.items(): result = network_control.network(self,i,j) assert result,u"添加多个IP或域名有效性检查失败,失败网站是:%s:%s"%(i,j)