#NEWLINE# def test_copy_page_with_generic_foreign_key( self ) : #NEWLINE# #INDENT# event_index = Page . objects . get ( url_path = '/home/events/' ) #NEWLINE# advert = Advert . objects . create ( url = 'http://www.heinz.com/' , text = 'beanz meanz heinz' ) #NEWLINE# page = GenericSnippetPage ( title = 'My snippet page' , slug = 'my-snippet-page' ) #NEWLINE# page . snippet_content_object = homepage #NEWLINE# event_index . add_child ( instance = page ) #NEWLINE# page . save_revision ( ) . publish ( ) #NEWLINE# homepage = Page . objects . get ( url_path = '/home/' ) #NEWLINE# new_page = page . copy ( to = homepage ) #NEWLINE# self . assertNotEqual ( page . id , new_page . id ) #NEWLINE# self . assertEqual ( new_page . snippet_content_object , advert )