def checkStatus(self, startStatus, *flagNames): expectedStatus = startStatus for name in flagNames: expectedStatus |= getattr(CommunicationStatus, name) status = CommunicationStatus(self.note).status self.failUnlessEqual(status, expectedStatus, "Unexpected communication status: got %s, expected %s" % (CommunicationStatus.dump(status), CommunicationStatus.dump(expectedStatus)))
def addDisplayWhos(self, whos): super(Note, self).addDisplayWhos(whos) for stampObject in Stamp(self).stamps: method = getattr(stampObject, 'addDisplayWhos', lambda _: None) method(whos) from osaf.communicationstatus import CommunicationStatus CommunicationStatus(self).addDisplayWhos(whos)
def getCompareTuple(self, uuid): commState = CommunicationStatus.getItemCommState(uuid, self.itsView) return (commState,)
def GetAttributeValue(self, item, attributeName): # Determine what state this item is in. return getCommStateName(CommunicationStatus(item).status)
def getCompareTuple(self, uuid): commState = CommunicationStatus.getItemCommState(uuid, self.itsView) return (commState, )