#NEWLINE# def test_delete_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' , 'Testing' , 0 ) , ( 'TestPage' , 2 , 43 , 'kate' , '192.168.0.11' , 'Bla' , 'Changing' , 0 ) ] ) #NEWLINE# page = WikiPage ( self . env , 'TestPage' ) #NEWLINE# page . delete ( version = 2 ) #NEWLINE# self . assertTrue ( page . exists ) #NEWLINE# self . assertEqual ( [ ( 1 , 42 , 'joe' , '::1' , 'Bla bla' , 'Testing' , 0 ) ] , self . env . db_query ( '\n                SELECT version, time, author, ipnr, text, comment, readonly\n                FROM wiki WHERE name=%s\n                ' , ( 'TestPage' , ) ) ) #NEWLINE# listener = TestWikiChangeListener ( self . env ) #NEWLINE# self . assertEqual ( page , listener . deleted_version [ 0 ] )