#NEWLINE# @ defer . inlineCallbacks #NEWLINE# def statustest_web_server_without_pb( self ) : #NEWLINE# #INDENT# ' If the pb server is stopped, the web server should return an error status. ' #NEWLINE# self . pb_server . stopService ( ) #NEWLINE# self . addCleanup ( self . pb_server . startService ) #NEWLINE# try : #NEWLINE# #INDENT# ( yield client . getPage ( 'http://localhost:8080' ) ) #NEWLINE# self . fail ( 'Expected an error to be raised.' ) #NEWLINE# #UNINDENT# except error . Error as e : #NEWLINE# #INDENT# self . assertEquals ( self . status , '500' ) #NEWLINE# self . assertIn ( 'web.Server Traceback' , e . response )