示例#1
0
 def testHbacErrorString(self):
     errors = [
         pyhbac.HBAC_ERROR_UNKNOWN, pyhbac.HBAC_SUCCESS,
         pyhbac.HBAC_ERROR_NOT_IMPLEMENTED, pyhbac.HBAC_ERROR_OUT_OF_MEMORY,
         pyhbac.HBAC_ERROR_UNPARSEABLE_RULE
     ]
     for e in errors:
         s = pyhbac.hbac_error_string(e)
         self.assertIsInstance(s, unicode)
         assert len(s) > 0
示例#2
0
文件: pyhbac-test.py 项目: abbra/sssd
 def testHbacErrorString(self):
     errors = [ pyhbac.HBAC_ERROR_UNKNOWN,
                pyhbac.HBAC_SUCCESS,
                pyhbac.HBAC_ERROR_NOT_IMPLEMENTED,
                pyhbac.HBAC_ERROR_OUT_OF_MEMORY,
                pyhbac.HBAC_ERROR_UNPARSEABLE_RULE ]
     for e in errors:
         s = pyhbac.hbac_error_string(e)
         self.assertIsInstance(s, unicode)
         assert len(s) > 0