#NEWLINE# @ with_clock #NEWLINE# def test_request_timeout_fired( self , clock ) : #NEWLINE# #INDENT# '\n        Verify the request is cancelled if a response is not received\n        within specified timeout period.\n        ' #NEWLINE# self . agent . request . return_value = d = Deferred ( ) #NEWLINE# self . client . request ( 'GET' , 'http://example.com' , timeout = 2 ) #NEWLINE# clock . advance ( 3 ) #NEWLINE# self . failureResultOf ( self , CancelledError )