#NEWLINE# def test_cm_puts_connection_back_into_pool( ) : #NEWLINE# #INDENT# ( pool , conn ) = ( Mock ( ) , Mock ( ) ) #NEWLINE# pool . getconn . return_value = conn #NEWLINE# tree = Tree ( pool = pool ) #NEWLINE# with tree ( ) as transaction : #NEWLINE# #INDENT# pass #NEWLINE# #UNINDENT# assert pool . putconn . called #NEWLINE# pool . putconn . assert_called_with ( conn )