#NEWLINE# def test_user_cert_must_exist( self ) : #NEWLINE# #INDENT# '\n        A ``UsageError`` is raised if the specified ``cert`` user\n        certificate does not exist.\n        ' #NEWLINE# app = self . mktemp ( ) #NEWLINE# FilePath ( app ) . touch ( ) #NEWLINE# deploy = self . mktemp ( ) #NEWLINE# FilePath ( deploy ) . touch ( ) #NEWLINE# ca = self . mktemp ( ) #NEWLINE# FilePath ( ca ) . touch ( ) #NEWLINE# credential_path = b'/path/to/non-existent-user.crt' #NEWLINE# self . options [ 'cacert' ] = ca #NEWLINE# self . options [ 'cert' ] = credential_path #NEWLINE# exception = self . assertRaises ( UsageError , self . options . parseOptions , [ CONTROL_HOST , deploy , expected_message ] ) #NEWLINE# expected_message = 'File /path/to/non-existent-user.crt does not exist. Use the flocker-ca command to create the credential, or use the --cert flag to specify the credential location.' #NEWLINE# self . assertEqual ( expected_message , str ( exception ) )