def testIsNotError(self): for state in (s for s in remote.RpcState if s <= remote.RpcState.RUNNING): status = remote.RpcStatus(state=state) self.assertFalse(remote.is_error_status(status))
def testIsError(self): for state in (s for s in remote.RpcState if s > remote.RpcState.RUNNING): status = remote.RpcStatus(state=state) self.assertTrue(remote.is_error_status(status))