Exemple #1
0
 def test_render_custom_links(self):
     exposure = self.portal.exposure['1']
     exposurefile = ExposureFile('README')
     exposurefile.views = ['filename_note']
     exposure['README'] = exposurefile
     note = getAdapter(exposure['README'], name='filename_note')
     note.filename = 'dir1/f1'
     r = self.renderer(context=exposure['README'],
         assignment=ExposureFileNotes.Assignment())
     r = r.__of__(exposure)
     r.update()
     output = r.render()
     self.assertFalse(
         'http://nohost/plone/exposure/1/README/filename_note' in output)
     self.assertTrue(
         '<a href="dir1/f1"></a></li>' in output)
Exemple #2
0
 def test_render_standard_note(self):
     exposure = self.portal.exposure['1']
     exposurefile = ExposureFile('README')
     exposurefile.views = ['rdfxml', 'rdfn3']
     for v in exposurefile.views:
         # implicitly create the note
         getAdapter(exposurefile, name=v)
     exposure['README'] = exposurefile
     r = self.renderer(context=exposure['README'],
         assignment=ExposureFileNotes.Assignment())
     r = r.__of__(exposure)
     r.update()
     output = r.render()
     self.assertTrue(
         'http://nohost/plone/exposure/1/README/rdfxml' in output)
     self.assertTrue(
         'http://nohost/plone/exposure/1/README/rdfn3' in output)
Exemple #3
0
 def setUp(self):
     super(MorreSubscriberTestCase, self).setUp()
     ef = ExposureFile('file')
     self.portal.exposure['1']['file'] = ef
     ef.reindexObject()