#NEWLINE# @ mock . patch ( 'tooz.drivers.pgsql.psycopg2.connect' ) #NEWLINE# def test_connect_failure_operational( self , psycopg2_connector ) : #NEWLINE# #INDENT# psycopg2_connector . side_effect = psycopg2 . OperationalError ( 'Broken' ) #NEWLINE# c = self . _create_coordinator ( ) #NEWLINE# self . assertRaises ( coordination . ToozConnectionError , c . start )