#NEWLINE# def test_isnull_with_filter_overrides( self ) : #NEWLINE# #INDENT# class OFilterSet ( FilterSet ) : #NEWLINE# #INDENT# filter_overrides = { #NEWLINE# #INDENT# models . BooleanField : { #NEWLINE# #INDENT# 'filter_class' : BooleanFilter , #NEWLINE# 'extra' : ( lambda f : { #NEWLINE# #INDENT# 'widget' : BooleanWidget , #NEWLINE# #UNINDENT# } ) , #NEWLINE# #UNINDENT# } , #NEWLINE# #UNINDENT# } #NEWLINE# #UNINDENT# f = Article . _meta . get_field ( 'author' ) #NEWLINE# ( result , params ) = OFilterSet . filter_for_lookup ( f , 'isnull' ) #NEWLINE# self . assertEqual ( result , BooleanFilter ) #NEWLINE# self . assertEqual ( self [ 'widget' ] , BooleanWidget )