#NEWLINE# def test_create_page( self ) : #NEWLINE# #INDENT# page = WikiPage ( self . env ) #NEWLINE# page . name = 'TestPage' #NEWLINE# page . text = 'Bla bla' #NEWLINE# t = datetime ( 2001 , 1 , 1 , 1 , 1 , 1 , 0 , utc ) #NEWLINE# page . save ( 'joe' , 'Testing' , '::1' , t ) #NEWLINE# self . assertTrue ( page . exists ) #NEWLINE# self . assertEqual ( 1 , page . version ) #NEWLINE# self . assertIsNone ( page . resource . version ) #NEWLINE# self . assertEqual ( 0 , page . readonly ) #NEWLINE# self . assertEqual ( 'joe' , page . author ) #NEWLINE# self . assertEqual ( 'Testing' , page . comment ) #NEWLINE# self . assertEqual ( t , page . time ) #NEWLINE# self . assertEqual ( [ ( 1 , to_utimestamp ( t ) , '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 . added [ 0 ] )