#NEWLINE# def Run( self ) : #NEWLINE# #INDENT# with test_lib . FakeTime ( 42 ) : #NEWLINE# #INDENT# self . CreateAdminUser ( 'approver' ) #NEWLINE# hunt = hunts . GRRHunt . StartHunt ( hunt_name = 'GenericHunt' , token = self . token ) #NEWLINE# #UNINDENT# with test_lib . FakeTime ( 43 ) : #NEWLINE# #INDENT# flow . GRRFlow . StartFlow ( flow_name = 'RequestHuntApprovalFlow' , reason = self . token . reason , subject_urn = hunt . urn , approver = 'approver' , token = self . token ) #NEWLINE# #UNINDENT# with test_lib . FakeTime ( 126 ) : #NEWLINE# #INDENT# self . Check ( 'GET' , '/api/users/me/approvals/hunt' , replace = { #NEWLINE# #INDENT# utils . SmartStr ( hunt . urn . Basename ( ) ) : 'H:123456' , #NEWLINE# #UNINDENT# } )