#NEWLINE# def test_api_error_version_mismatch( self , mock_logging ) : #NEWLINE# #INDENT# with pytest . raises ( errors . ConnectionError ) : #NEWLINE# #INDENT# with handle_connection_errors ( mock . Mock ( api_version = '1.22' ) ) : #NEWLINE# #INDENT# raise APIError ( None , None , b'client is newer than server' ) #NEWLINE# #UNINDENT# #UNINDENT# ( _ , args , _ ) = self . error . mock_calls [ 0 ] #NEWLINE# assert ( 'Docker Engine of version 1.10.0 or greater' in args [ 0 ] )