Ejemplo n.º 1
0
 def test_unicode_values(self):
     v = "a"
     cls = Unicode(100, type_name="tn", values=list("abcd"))
     assert not cls.get_type_name() is Unicode.Empty
     elt = _test_type(cls, v).xpath("div/select")[0]
     assert elt.tag == "select"
     assert elt.xpath("option/@value") == [""] + list("abcd")
     assert elt.xpath("option[@selected]/text()") == [v]
Ejemplo n.º 2
0
 def test_unicode_values(self):
     v = 'a'
     cls = Unicode(100, type_name="tn", values=list('abcd'))
     assert not cls.get_type_name() is Unicode.Empty
     elt = _test_type(cls, v).xpath('div/select')[0]
     assert elt.tag == 'select'
     assert elt.xpath("option/@value") == [''] + list('abcd')
     assert elt.xpath("option[@selected]/text()") == [v]
Ejemplo n.º 3
0
 def test_unicode_values(self):
     v = 'a'
     cls = Unicode(100, type_name="tn", values=list('abcd'))
     assert not cls.get_type_name() is Unicode.Empty
     elt = _test_type(cls, v).xpath('div/select')[0]
     assert elt.tag == 'select'
     assert elt.xpath("option/@value") == [''] + list('abcd')
     assert elt.xpath("option[@selected]/text()") == [v]