Commits

Ralph Bean committed 9343b27

Test for SingleSelectField.

Comments (0)

Files changed (1)

tests/test_widget.py

 
 
 class TestSingleSelectField(WidgetTest):
+    """ There's actually nothing special about this guy.  """
     widget = twb.SingleSelectField
-    expected = """<TODO>How should this actually work?</TODO>"""
+    attrs = {
+             'options':((1, 'a'), (2, 'b'), (3, 'c')), 'id':'hid',
+             'validator': twc.IntValidator(),
+             }
+    expected = """<select id="hid" name="hid">
+                        <option></option>
+                        <option value="1">a</option>
+                        <option value="2">b</option>
+                        <option value="3">c</option>
+                  </select>"""
 
 
 class TestSpacer(WidgetTest):
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.