@@ -53,11 +53,11 @@ def set_up(self):
5353 @mock .patch ('SoftLayer.CLI.formatting.confirm' )
5454 @mock .patch ('SoftLayer.CLI.environment.Environment.getpass' )
5555 @mock .patch ('SoftLayer.CLI.environment.Environment.input' )
56- def test_setup (self , input , getpass , confirm_mock ):
56+ def test_setup (self , mocked_input , getpass , confirm_mock ):
5757 with tempfile .NamedTemporaryFile () as config_file :
5858 confirm_mock .return_value = True
5959 getpass .return_value = 'A' * 64
60- input .side_effect = ['user' , 'public' , 0 ]
60+ mocked_input .side_effect = ['user' , 'public' , 0 ]
6161
6262 result = self .run_command (['--config=%s' % config_file .name ,
6363 'config' , 'setup' ])
@@ -76,11 +76,11 @@ def test_setup(self, input, getpass, confirm_mock):
7676 @mock .patch ('SoftLayer.CLI.formatting.confirm' )
7777 @mock .patch ('SoftLayer.CLI.environment.Environment.getpass' )
7878 @mock .patch ('SoftLayer.CLI.environment.Environment.input' )
79- def test_setup_cancel (self , input , getpass , confirm_mock ):
79+ def test_setup_cancel (self , mocked_input , getpass , confirm_mock ):
8080 with tempfile .NamedTemporaryFile () as config_file :
8181 confirm_mock .return_value = False
8282 getpass .return_value = 'A' * 64
83- input .side_effect = ['user' , 'public' , 0 ]
83+ mocked_input .side_effect = ['user' , 'public' , 0 ]
8484
8585 result = self .run_command (['--config=%s' % config_file .name ,
8686 'config' , 'setup' ])
@@ -90,32 +90,33 @@ def test_setup_cancel(self, input, getpass, confirm_mock):
9090
9191 @mock .patch ('SoftLayer.CLI.environment.Environment.getpass' )
9292 @mock .patch ('SoftLayer.CLI.environment.Environment.input' )
93- def test_get_user_input_private (self , input , getpass ):
93+ def test_get_user_input_private (self , mocked_input , getpass ):
9494 getpass .return_value = 'A' * 64
95- input .side_effect = ['user' , 'private' , 0 ]
95+ mocked_input .side_effect = ['user' , 'private' , 0 ]
9696
9797 username , secret , endpoint_url , timeout = (
9898 config .get_user_input (self .env ))
9999
100100 self .assertEqual (username , 'user' )
101101 self .assertEqual (secret , 'A' * 64 )
102102 self .assertEqual (endpoint_url , consts .API_PRIVATE_ENDPOINT )
103+ self .assertEqual (timeout , 0 )
103104
104105 @mock .patch ('SoftLayer.CLI.environment.Environment.getpass' )
105106 @mock .patch ('SoftLayer.CLI.environment.Environment.input' )
106- def test_get_user_input_custom (self , input , getpass ):
107+ def test_get_user_input_custom (self , mocked_input , getpass ):
107108 getpass .return_value = 'A' * 64
108- input .side_effect = ['user' , 'custom' , 'custom-endpoint' , 0 ]
109+ mocked_input .side_effect = ['user' , 'custom' , 'custom-endpoint' , 0 ]
109110
110111 _ , _ , endpoint_url , _ = config .get_user_input (self .env )
111112
112113 self .assertEqual (endpoint_url , 'custom-endpoint' )
113114
114115 @mock .patch ('SoftLayer.CLI.environment.Environment.getpass' )
115116 @mock .patch ('SoftLayer.CLI.environment.Environment.input' )
116- def test_get_user_input_default (self , input , getpass ):
117+ def test_get_user_input_default (self , mocked_input , getpass ):
117118 self .env .getpass .return_value = 'A' * 64
118- self . env . input .side_effect = ['user' , 'public' , 0 ]
119+ mocked_input .side_effect = ['user' , 'public' , 0 ]
119120
120121 _ , _ , endpoint_url , _ = config .get_user_input (self .env )
121122
0 commit comments