#NEWLINE# @ add_fixtures ( [ 'test_users' , 'test_scmtools' ] ) #NEWLINE# def test_close_submitted_hook_ping( self ) : #NEWLINE# #INDENT# 'Testing GitHub close_submitted hook ping' #NEWLINE# account = self . _get_hosting_account ( ) #NEWLINE# account . save ( ) #NEWLINE# repository = self . create_repository ( hosting_account = account ) #NEWLINE# review_request = self . create_review_request ( repository = repository , publish = True ) #NEWLINE# self . assertTrue ( review_request . public ) #NEWLINE# self . assertEqual ( review_request . status , review_request . PENDING_REVIEW ) #NEWLINE# url = local_site_reverse ( 'github-hooks-close-submitted' , kwargs = { #NEWLINE# #INDENT# 'repository_id' : repository . pk , #NEWLINE# 'hosting_service_id' : 'github' , #NEWLINE# #UNINDENT# } ) #NEWLINE# response = self . _post_commit_hook_payload ( url , review_request , repository . get_or_create_hooks_uuid ( ) , event = 'ping' ) #NEWLINE# self . assertEqual ( response . status_code , 200 ) #NEWLINE# review_request = ReviewRequest . objects . get ( pk = review_request . pk ) #NEWLINE# self . assertTrue ( review_request . public ) #NEWLINE# self . assertEqual ( review_request . status , review_request . PENDING_REVIEW ) #NEWLINE# self . assertEqual ( review_request . changedescs . count ( ) , 0 )