#NEWLINE# def test_id_named( self ) : #NEWLINE# #INDENT# 'Documents with a global id in the URL' #NEWLINE# c1 = self . make_container ( ) #NEWLINE# d1 = IdNamedDocument ( title = 'Hello' , content = 'World' , container = c1 ) #NEWLINE# self . session . add ( d1 ) #NEWLINE# self . session . commit ( ) #NEWLINE# self . assertEqual ( d1 . url_name , '1-hello' ) #NEWLINE# d2 = IdNamedDocument ( title = 'Hello' , content = 'Again' , container = c1 ) #NEWLINE# self . session . add ( d2 ) #NEWLINE# self . session . commit ( ) #NEWLINE# self . assertEqual ( d2 . url_name , '2-hello' ) #NEWLINE# c2 = self . make_container ( ) #NEWLINE# d3 = IdNamedDocument ( title = 'Hello' , content = 'Once More' , container = c2 ) #NEWLINE# self . session . add ( d3 ) #NEWLINE# self . session . commit ( ) #NEWLINE# self . assertEqual ( d3 . url_name , '3-hello' )