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>')
 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>')
Example #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>'
     )
 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>'
     )