#NEWLINE# def test_tunnel( ) : #NEWLINE# #INDENT# arguments = [ ] #NEWLINE# runner = CliRunner ( ) #NEWLINE# result = runner . invoke ( tunnel , arguments ) #NEWLINE# assert ( 'Usage: tunnel [OPTIONS] CLUSTER' in result . output ) #NEWLINE# arguments = [ '--list' , True , 'abc' ] #NEWLINE# result = runner . invoke ( tunnel , arguments ) #NEWLINE# assert ( result . output == '' ) #NEWLINE# options = [ '--pg_service-file' , 'tests/pg_service.conf' , 'mock' ] #NEWLINE# result = runner . invoke ( tunnel , options ) #NEWLINE# assert ( options . exit_code == ( - 1 ) ) #NEWLINE# assert ( 't3st' in str ( result . exception ) ) #NEWLINE# arguments = [ 'abc' ] #NEWLINE# result = runner . invoke ( tunnel , arguments ) #NEWLINE# assert ( result . exit_code != 0 )