def test_is_checket_if_url_is_in_request(self): self.brain.REQUEST.set('paths', [ '/'.join(self.folder.getPhysicalPath()), ]) html = fromstring(path_radiobutton(self.brain, None)) self.assertEqual(True, html.checked)
def test_is_checket_if_url_is_in_request(self): self.brain.REQUEST.set( 'paths', ['/'.join(self.folder.getPhysicalPath()), ]) html = fromstring(path_radiobutton(self.brain, None)) self.assertEqual(True, html.checked)
def test_is_not_checked_per_default(self): html = fromstring(path_radiobutton(self.brain, None)) self.assertEqual(False, html.checked)
def test_title_has_prefix(self): html = fromstring(path_radiobutton(self.brain, None)) self.assertEqual( 'Select %s' % self.folder.Title(), html.attrib.get('title'))
def test_input_type_is_radio(self): html = fromstring(path_radiobutton(self.brain, None)) self.assertEqual('radio', html.type)
def test_title_has_prefix(self): html = fromstring(path_radiobutton(self.brain, None)) self.assertEqual('Select %s' % self.folder.Title(), html.attrib.get('title'))