#NEWLINE# def test_checks_called_on_the_default_database( self ) : #NEWLINE# #INDENT# class Model ( models . Model ) : #NEWLINE# #INDENT# field = models . CharField ( max_length = 100 ) #NEWLINE# #UNINDENT# model = Model ( ) #NEWLINE# with self . _patch_check_field_on ( 'default' ) as mock_check_field_default : #NEWLINE# #INDENT# with self . _patch_check_field_on ( 'other' ) as mock_check_field_other : #NEWLINE# #INDENT# model . check ( ) #NEWLINE# self . assertTrue ( model . called ) #NEWLINE# self . assertFalse ( mock_check_field_other . called )