Ejemplo n.º 1
0
 def testInvalidSync(self):
     s = ~eSync.SYNCHRONOUS
     assert not eSync.isValid(s)
     api = iApiAction(self.ipc, "hello.world", self.solicited)
     try:
         api.sync = s
     except ApiParamError, e:
         assert e.item == s
         assert eSync in e.allowedTypes
         assert len(e.allowedTypes) == 1
Ejemplo n.º 2
0
 def setSync(self, sync=eSync.SYNCHRONOUS):
     if not eSync.isValid(sync):
         raise ApiParamError(sync, eSync)
     self._sync = sync