#NEWLINE# def test_scenario( ) : #NEWLINE# #INDENT# morepath . scan ( scenario ) #NEWLINE# c = Client ( app . Root ( ) ) #NEWLINE# response = c . get ( '/document' ) #NEWLINE# assert ( response . body == b'Document root' ) #NEWLINE# response = c . get ( '/foo' ) #NEWLINE# assert ( response . body == b'Generic root' ) #NEWLINE# response = c . get ( '/document/a' ) #NEWLINE# assert ( response . body == b'Document model a' ) #NEWLINE# response = c . get ( '/foo/a' ) #NEWLINE# assert ( response . body == b'Generic model a' ) #NEWLINE# response = c . get ( '/' ) #NEWLINE# assert ( response . json == [ 'http://localhost/foo/a' , 'http://localhost/document/b' ] ) #NEWLINE# response = c . get ( '/foo/a/link' ) #NEWLINE# assert ( response . body == b'http://localhost/document/c' ) #NEWLINE# response = c . get ( '/document/a/link' ) #NEWLINE# assert ( response . body == b'http://localhost/foo/d' )