Ejemplo n.º 1
0
 def test_edit_field(self):
     request = TestRequest(form={
         'form.widgets.prefix_maps': 'models.example.com /plone',
         'form.buttons.apply': 1,
     })
     form = VHostRemapEditForm(self.portal, request)
     form.update()
     result = form.render()
     self.assertEqual(self.vhosts.prefix_maps,
         {u'models.example.com': u'/plone'})
Ejemplo n.º 2
0
 def test_render_field(self):
     self.vhosts.prefix_maps = {
         u'models.example.org': u'/plone',
         u'models.example.com': u'/plone',
     }
     request = TestRequest()
     form = VHostRemapEditForm(self.portal, request)
     form.update()
     result = form.render()
     self.assertIn('models.example.com /plone\nmodels.example.org /plone',
         result)
Ejemplo n.º 3
0
 def test_basic_render_form(self):
     request = TestRequest()
     form = VHostRemapEditForm(self.portal, request)
     form.update()
     result = form.render()
     self.assertTrue(result)