def test_dbl_read(self): ''' Tests accessibility of cfg file, does not check format ''' CFPropertyManager.SERVICE_URL=_testConf.get('DEFAULT', 'BaseURL') CFPropertyManager.username=_testConf.get('DEFAULT', 'username') CFPropertyManager.password=_testConf.get('DEFAULT', 'password') CFPropertyManager.startClient() fo = open("cf-property-manager-test-dbl", "w+") fo.write("UT:RF-Cu:1{LD}Time:ShtDwn-I") fo.close() dbllines = CFPropertyManager.readDBL("cf-property-manager-test-dbl") for line in dbllines: self.assertTrue(line in CFPropertyManager.dbllines) return dbllines
def test_dbl_read(self): ''' Tests accessibility of cfg file, does not check format ''' CFPropertyManager.SERVICE_URL = _testConf.get('DEFAULT', 'BaseURL') CFPropertyManager.username = _testConf.get('DEFAULT', 'username') CFPropertyManager.password = _testConf.get('DEFAULT', 'password') CFPropertyManager.startClient() fo = open("cf-property-manager-test-dbl", "w+") fo.write("UT:RF-Cu:1{LD}Time:ShtDwn-I") fo.close() dbllines = CFPropertyManager.readDBL("cf-property-manager-test-dbl") for line in dbllines: self.assertTrue(line in CFPropertyManager.dbllines) return dbllines
def test_cfg_read(self): ''' Tests accessibility of cfg file, does not check format ''' global cfglines CFPropertyManager.SERVICE_URL=_testConf.get('DEFAULT', 'BaseURL') CFPropertyManager.username=_testConf.get('DEFAULT', 'username') CFPropertyManager.password=_testConf.get('DEFAULT', 'password') CFPropertyManager.startClient() fo = open("cf-property-manager-test-cfg", "w+") fo.write("devName=[{][^:}][^:}]*\ndevType=[:][^{]*?[:}](?!.*[{])\nIGNORE=.*WtrSkid.*") fo.close() cfglines = CFPropertyManager.readConfiguration("cf-property-manager-test-cfg") for line in cfglines: self.assertTrue(line in CFPropertyManager.cfglines) return cfglines
def test_cfg_read(self): ''' Tests accessibility of cfg file, does not check format ''' global cfglines CFPropertyManager.SERVICE_URL = _testConf.get('DEFAULT', 'BaseURL') CFPropertyManager.username = _testConf.get('DEFAULT', 'username') CFPropertyManager.password = _testConf.get('DEFAULT', 'password') CFPropertyManager.startClient() fo = open("cf-property-manager-test-cfg", "w+") fo.write( "devName=[{][^:}][^:}]*\ndevType=[:][^{]*?[:}](?!.*[{])\nIGNORE=.*WtrSkid.*" ) fo.close() cfglines = CFPropertyManager.readConfiguration( "cf-property-manager-test-cfg") for line in cfglines: self.assertTrue(line in CFPropertyManager.cfglines) return cfglines