#NEWLINE# def test_gets_sections( self ) : #NEWLINE# #INDENT# 'Test getting sections out of paths.' #NEWLINE# page_path = '/One/Two/Three' #NEWLINE# page = WikiPage ( page_path ) #NEWLINE# sections = page . sections #NEWLINE# self . assertEqual ( len ( sections ) , 2 ) #NEWLINE# self . assertEqual ( sections [ 0 ] . name , 'One' ) #NEWLINE# self . assertEqual ( sections [ 0 ] . path , 'One' ) #NEWLINE# self . assertEqual ( sections [ 1 ] . name , 'Two' ) #NEWLINE# self . assertEqual ( sections [ 1 ] . path , 'One/Two' ) #NEWLINE# section_path = '/Foo/Bar' #NEWLINE# section = WikiSection ( section_path ) #NEWLINE# sections = sections . sections #NEWLINE# self . assertEqual ( len ( sections ) , 2 ) #NEWLINE# self . assertEqual ( sections [ 0 ] . name , 'Foo' ) #NEWLINE# self . assertEqual ( sections [ 0 ] . path , 'Foo' ) #NEWLINE# self . assertEqual ( sections [ 1 ] . name , 'Bar' ) #NEWLINE# self . assertEqual ( sections [ 1 ] . path , 'Foo/Bar' )