#NEWLINE# def test_max_min_limits( self ) : #NEWLINE# #INDENT# f = self . new_field ( self . field_class , minimum = 2 , maximum = 4 ) #NEWLINE# self . assertEquals ( f . to_search_value ( 2 ) , 2 ) #NEWLINE# self . assertEquals ( f . to_search_value ( 4 ) , 4 ) #NEWLINE# self . assertEquals ( f . to_search_value ( None ) , f . none_value ( ) ) #NEWLINE# self . assertRaises ( ValueError , f . to_search_value , 5 ) #NEWLINE# self . assertRaises ( ValueError , self . to_search_value , 1 )