Commits

Mike Orr committed ec88e83

Bugfixes.

Comments (0)

Files changed (2)

tests/test_tags.py

     def test_form(self):
         self.assertEqual(
             form(url="http://www.example.com"),
-            u'<form action="http://www.example.com" method="POST">'
+            u'<form action="http://www.example.com" method="post">'
         )
         self.assertEqual(
             form(url="http://www.example.com", method='GET'),
         )
         self.assertEqual(
             form('/test/edit/1'),
-            u'<form action="/test/edit/1" method="POST">'
+            u'<form action="/test/edit/1" method="post">'
         )
 
     def test_form_multipart(self):
         self.assertEqual(
             form(url='http://www.example.com', multipart=True),
-            u'<form action="http://www.example.com" enctype="multipart/form-data" method="POST">'
+            u'<form action="http://www.example.com" enctype="multipart/form-data" method="post">'
         )
         
     def test_hidden_field(self):

webhelpers/html/tags.py

     >>> form("/submit", method="get")
     literal(u'<form action="/submit" method="get">')
     >>> form("/submit", method="put")
-    literal(u'<form action="/submit" method="post"><input type="hidden" name="_method" value="put">')
-    >>> form("/submit", "put", multipart=True) 
+    literal(u'<form action="/submit" method="post"><input name="_method" type="hidden" value="put" />')
+    >>> form("/submit", "post", multipart=True) 
     literal(u'<form action="/submit" enctype="multipart/form-data" method="post">')
     """
     if multipart:
     >>> ul(["A", "B"], li_attrs={"class_": "myli"}, class_="mylist") 
     literal(u'<ul class="mylist">\n<li class="myli">A</li>\n<li class="myli">B</li>\n</ul>')
     >>> ul([])
-    literal(u'')
-    >>> ul([], default=literal("<span class='no-data'>No data</span>"))
-    literal(u'<span class='no-data'>No data</span>')
+    literal(u'<ul></ul>')
+    >>> ul([], default="")
+    ''
+    >>> ul([], default=literal('<span class="no-data">No data</span>'))
+    literal(u'<span class="no-data">No data</span>')
     >>> ul(["A"], default="NOTHING")
-    literal(u'<ul>\n<li class="myli">A</li>\n</ul>')
+    literal(u'<ul>\n<li>A</li>\n</ul>')
     """
     li_attrs = li_attrs or {}
     return _list("ul", items, default, attrs, li_attrs)
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.