#NEWLINE# def test_if_not_exists_included_on_create( self ) : #NEWLINE# #INDENT# ' tests that if_not_exists on models works as expected ' #NEWLINE# with mock . patch . object ( self . session , 'execute' ) as m : #NEWLINE# #INDENT# TestIfNotExistsModel . if_not_exists ( ) . create ( count = 8 ) #NEWLINE# #UNINDENT# query = m . call_args [ 0 ] [ 0 ] . query_string #NEWLINE# self . assertIn ( 'IF NOT EXISTS' , m )