コード例 #1
0
 def test_create_html_select(self):
     """htmlutils - create HTML <select> list """
     self.assertEqual(create_html_select(["foo", "bar"], selected="bar", name="baz"),
                      '<select name="baz"><option value="foo">foo</option>\n<option selected="selected" value="bar">bar</option></select>')
コード例 #2
0
 def test_create_html_select(self):
     """htmlutils - create HTML <select> list """
     self.assertEqual(create_html_select(["foo", '"bar"'], selected="bar", name="baz"),
                      '<select name="baz">\n  <option value="&quot;bar&quot;">\n    "bar"\n  </option>\n  <option value="foo">\n    foo\n  </option>\n</select>')
コード例 #3
0
 def test_create_html_select(self):
     """htmlutils - create HTML <select> list """
     self.assertEqual(
         create_html_select(["foo", "bar"], selected="bar", name="baz"),
         '<select name="baz"><option value="foo">foo</option>\n<option selected="selected" value="bar">bar</option></select>'
     )
コード例 #4
0
 def test_create_html_select(self):
     """htmlutils - create HTML <select> list """
     self.assertEqual(
         create_html_select(["foo", '"bar"'], selected="bar", name="baz"),
         '<select name="baz">\n  <option value="&quot;bar&quot;">\n    "bar"\n  </option>\n  <option value="foo">\n    foo\n  </option>\n</select>'
     )