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'})
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)
def test_basic_render_form(self): request = TestRequest() form = VHostRemapEditForm(self.portal, request) form.update() result = form.render() self.assertTrue(result)