Exemplo n.º 1
0
 def __init__(self, composer, recipients, subject, messageBody, attachments, inline, parentMessage, parentAction):
     LiveFragment.__init__(self)
     self.composer = composer
     self.recipients = recipients
     self.subject = subject
     self.messageBody = messageBody
     self.attachments = attachments
     self.inline = inline
     self.invokeArguments = []
     self.parentMessage = parentMessage
     self.parentAction = parentAction
 def __init__(self, composer, recipients, subject, messageBody, attachments,
              inline, parentMessage, parentAction):
     LiveFragment.__init__(self)
     self.composer = composer
     self.recipients = recipients
     self.subject = subject
     self.messageBody = messageBody
     self.attachments = attachments
     self.inline = inline
     self.invokeArguments = []
     self.parentMessage = parentMessage
     self.parentAction = parentAction
 def testRenderLiveFragment(self):
     """
     Test that L{render} spits out the right thing for a L{LiveFragment}.
     """
     self.assertIn(
         self.message,
         render(LiveFragment(docFactory=self.docFactory)))
Exemplo n.º 4
0
 def test_navPage(self):
     """
     Test that L{webapp.GenericNavigationLivePage} supports theming of
     Athena's unsupported-browser page based on an L{ITemplateNameResolver}
     installed on the viewing user's store.
     """
     subStore = SubStore.createNew(self.siteStore,
                                   ['athena', 'unsupported']).open()
     stp = StubThemeProvider(store=subStore)
     installOn(stp, subStore)
     p = GenericNavigationAthenaPage(
         stp, LiveFragment(), _PageComponents([], None, None, None, None),
         None)
     self.assertEqual(p.renderUnsupported(None), flatten(CUSTOM_MSG))
 def rend(self, ctx, data):
     """
     Fill the slots the template requires to be filled in order to be
     rendered.
     """
     iq = inevow.IQ(self.docFactory)
     ctx.fillSlots('from', 'bob@example')
     ctx.fillSlots('to', '*****@*****.**')
     ctx.fillSlots('cc', '*****@*****.**')
     ctx.fillSlots('bcc', '*****@*****.**')
     ctx.fillSlots(
         'subject',
         iq.onePattern('subject').fillSlots('subject', 'Test Message'))
     ctx.fillSlots('attachments', '')
     ctx.fillSlots(
         'message-body',
         iq.onePattern('message-body').fillSlots('body',
                                                 'message body text'))
     return LiveFragment.rend(self, ctx, data)
Exemplo n.º 6
0
 def rend(self, ctx, data):
     """
     Fill the slots the template requires to be filled in order to be
     rendered.
     """
     iq = inevow.IQ(self.docFactory)
     ctx.fillSlots('from', 'bob@example')
     ctx.fillSlots('to', '*****@*****.**')
     ctx.fillSlots('cc', '*****@*****.**')
     ctx.fillSlots('bcc', '*****@*****.**')
     ctx.fillSlots(
         'subject',
         iq.onePattern('subject').fillSlots('subject', 'Test Message'))
     ctx.fillSlots('attachments', '')
     ctx.fillSlots(
         'message-body',
         iq.onePattern('message-body').fillSlots(
             'body', 'message body text'))
     return LiveFragment.rend(self, ctx, data)