コード例 #1
0
 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
コード例 #2
0
 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
コード例 #3
0
 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
コード例 #4
0
 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