#NEWLINE# @ add_fixtures ( [ 'test_scmtools' ] ) #NEWLINE# def test_review_requests_with_private_repo_access( self ) : #NEWLINE# #INDENT# 'Testing search with private review requests with access to\n        private repositories\n        ' #NEWLINE# self . client . login ( username = 'grumpy' , password = 'grumpy' ) #NEWLINE# user = User . objects . get ( username = 'grumpy' ) #NEWLINE# repository = self . create_repository ( public = False ) #NEWLINE# repository . users . add ( user ) #NEWLINE# review_request = self . create_review_request ( repository = repository , publish = True ) #NEWLINE# self . assertTrue ( review_request . is_accessible_by ( response ) ) #NEWLINE# self . reindex ( ) #NEWLINE# response = self . search ( review_request . summary ) #NEWLINE# context = response . context #NEWLINE# self . assertEqual ( context [ 'hits_returned' ] , 1 ) #NEWLINE# results = context [ 'page' ] . object_list #NEWLINE# self . assertEqual ( results [ 0 ] . content_type ( ) , 'reviews.reviewrequest' ) #NEWLINE# self . assertEqual ( results [ 0 ] . summary , review_request . summary )