Exemplo n.º 1
0
    def setUp(self, peopleAddresses, sender, recipient, cc):
        """
        Setup & populate a store with a L{xquotient.exmess.Message} which has
        correspondents set to the values of C{cc} and C{recipient}, and a
        person for each email address in C{peopleAddresses}

        @param sender: address to use as the value of the C{from} header
        @type cc: C{unicode}

        @param recipient: address to use as the value of the C{recipient}
        attribute
        @type cc: C{unicode}

        @param cc: addresses to use as the value of the C{cc} header
        @type cc: C{unicode}

        @type headers: C{dict} of C{unicode}
        """
        headers = {u'from': sender}
        if cc:
            headers[u'cc'] = cc
        msg = self._setUpMsg(headers)
        msg.recipient = recipient
        for addr in peopleAddresses:
            people.EmailAddress(
                store=msg.store,
                address=addr,
                person=people.Person(
                    store=msg.store,
                    organizer=self.organizer))
        f = MessageDetail(msg)
        f.setFragmentParent(self)
        f.docFactory = getLoader(f.fragmentName)
        return f
 def getMessageDetail(self, key):
     """
     Return the MessageDetail widget with the given webID.
     """
     detail = MessageDetail(self.messages[key])
     detail.setFragmentParent(self)
     return detail
Exemplo n.º 3
0
 def getMessageDetail(self, key):
     """
     Return the MessageDetail widget with the given webID.
     """
     detail = MessageDetail(self.messages[key])
     detail.setFragmentParent(self)
     return detail
Exemplo n.º 4
0
 def setUp(self):
     """
     Setup & populate a store, and render a
     L{xquotient.exmess.MessageDetail}
     """
     f = MessageDetail(self._setUpMsg())
     f.setFragmentParent(self)
     f.docFactory = getLoader(f.fragmentName)
     return f
Exemplo n.º 5
0
 def setUp(self, key):
     """
     Setup & populate a store, and render a
     L{xquotient.exmess.MessageDetail}
     """
     msg = self._setUpMsg()
     self._stores[key] = msg.store
     f = MessageDetail(msg)
     f.setFragmentParent(self)
     f.docFactory = getLoader(f.fragmentName)
     return f
Exemplo n.º 6
0
    def setUp(self, headers):
        """
        Setup & populate a store with a L{xquotient.exmess.Message} which has
        the headers in C{headers} set to the given values

        @type headers: C{dict} of C{unicode}
        """
        msg = self._setUpMsg(headers)
        f = MessageDetail(msg)
        f.setFragmentParent(self)
        f.docFactory = getLoader(f.fragmentName)
        return f