class ConfigTest(object): def __init__(self): self.my_ini = MyIni() def test_sms(self): print self.my_ini.get_sms() def test_ping(self): print self.my_ini.get_ping()
class PingTest(object): def __init__(self): self.my_ini = MyIni() self.p = Ping(**self.my_ini.get_ping()) def test_ping(self): """上传卡口数据""" r = self.p.get_ping('10.44.240.6') print r