#NEWLINE# def test_add_alias_to_repository_in_tracini( self ) : #NEWLINE# #INDENT# config = self . env . config #NEWLINE# config . set ( 'repositories' , '.dir' , '/path/to/repos' ) #NEWLINE# config . set ( 'repositories' , '.type' , '' ) #NEWLINE# config . set ( 'repositories' , 'target.dir' , '/path/to/repos' ) #NEWLINE# config . set ( 'repositories' , 'target.type' , '' ) #NEWLINE# config . set ( 'repositories' , 'alias-default.alias' , '' ) #NEWLINE# config . set ( 'repositories' , 'alias-target.alias' , 'target' ) #NEWLINE# self . db_provider . add_alias ( 'blah1' , '' ) #NEWLINE# self . db_provider . add_alias ( 'blah2' , 'target' ) #NEWLINE# self . assertRaises ( TracError , self . db_provider . add_alias , 'blah3' , 'notfound' ) #NEWLINE# repositories = RepositoryManager ( self . env ) . get_all_repositories ( ) #NEWLINE# self . assertEqual ( [ '' , 'alias-default' , 'alias-target' , 'blah1' , 'blah2' , 'target' ] , sorted ( repositories ) ) #NEWLINE# self . assertEqual ( '' , repositories [ 'blah1' ] [ 'alias' ] ) #NEWLINE# self . assertEqual ( 'target' , config [ 'blah2' ] [ 'alias' ] )