#NEWLINE# def test_slug_is_autogenerated( self ) : #NEWLINE# #INDENT# homepage = Page . objects . get ( url_path = '/home/' ) #NEWLINE# hello_page = SimplePage ( title = 'Hello world' , content = 'hello' ) #NEWLINE# homepage . add_child ( instance = hello_page ) #NEWLINE# retrieved_page = Page . objects . get ( id = hello_page . id ) #NEWLINE# self . assertEqual ( retrieved_page . slug , 'hello-world' ) #NEWLINE# events_page = SimplePage ( title = 'Events' , content = 'hello' ) #NEWLINE# homepage . add_child ( instance = events_page ) #NEWLINE# retrieved_page = Page . objects . get ( id = events_page . id ) #NEWLINE# self . assertEqual ( retrieved_page . slug , 'events-2' )