#NEWLINE# def test_edit_comment_of_page_version( self ) : #NEWLINE# #INDENT# self . env . db_transaction . executemany ( 'INSERT INTO wiki VALUES(%s,%s,%s,%s,%s,%s,%s,%s)' , [ ( 'TestPage' , 1 , 42 , 'joe' , '::1' , 'Bla bla' , 'old 1' , 0 ) , ( 'TestPage' , 2 , 43 , 'kate' , '::11' , 'Bla' , 'old 2' , 0 ) ] ) #NEWLINE# page = WikiPage ( self . env , 'TestPage' ) #NEWLINE# page . edit_comment ( 'edited comment two' ) #NEWLINE# old_page = WikiPage ( self . env , 'TestPage' , 1 ) #NEWLINE# old_page . edit_comment ( 'new comment one' ) #NEWLINE# self . assertEqual ( 'edited comment two' , page . comment ) #NEWLINE# self . assertEqual ( 'new comment one' , old_page . comment ) #NEWLINE# self . assertEqual ( [ ( 1 , 42 , 'joe' , '::1' , 'Bla bla' , 'new comment one' , 0 ) , ( 2 , 43 , 'kate' , '::11' , 'Bla' , 'edited comment two' , 0 ) ] , self . env . db_query ( '\n                SELECT version, time, author, ipnr, text, comment, readonly\n                FROM wiki WHERE name=%s\n                ORDER BY version\n                ' , ( 'TestPage' , ) ) ) #NEWLINE# listener = TestWikiChangeListener ( self . env ) #NEWLINE# self . assertEqual ( ( page , 'old 2' ) , listener . comment_modified [ 0 ] ) #NEWLINE# self . assertEqual ( ( old_page , 'old 1' ) , listener . comment_modified [ 1 ] )