#NEWLINE# def test_select( ) : #NEWLINE# #INDENT# form = OptionForm ( instance = Option ( price = 0.5 ) ) #NEWLINE# html = form [ 'price' ] . as_widget ( ) #NEWLINE# assert html . startswith ( '<select' ) #NEWLINE# assert ( 'value="0.50"' in html ) #NEWLINE# assert ( 'selected' in form )