#NEWLINE# def test_if_not_exists_included_on_save( self ) : #NEWLINE# #INDENT# " tests if we correctly put 'IF NOT EXISTS' for insert statement " #NEWLINE# with mock . patch . object ( self . session , 'execute' ) as m : #NEWLINE# #INDENT# tm = TestIfNotExistsModel ( count = 8 ) #NEWLINE# tm . if_not_exists ( ) . save ( ) #NEWLINE# #UNINDENT# query = m . call_args [ 0 ] [ 0 ] . query_string #NEWLINE# self . assertIn ( 'IF NOT EXISTS' , query )