@@ -62,19 +62,17 @@ def test_setup(self, mocked_input, getpass, confirm_mock):
6262 getpass .return_value = 'A' * 64
6363 mocked_input .side_effect = ['user' , 'public' , 0 ]
6464
65- result = self .run_command (['--config=%s' % config_file .name ,
66- 'config' , 'setup' ])
65+ result = self .run_command (['--config=%s' % config_file .name , 'config' , 'setup' ])
6766
6867 self .assert_no_fail (result )
69- self .assertTrue ('Configuration Updated Successfully'
70- in result .output )
68+ self .assertTrue ('Configuration Updated Successfully' in result .output )
7169 contents = config_file .read ().decode ("utf-8" )
7270 self .assertTrue ('[softlayer]' in contents )
7371 self .assertTrue ('username = user' in contents )
7472 self .assertTrue ('api_key = AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA'
7573 'AAAAAAAAAAAAAAAAAAAAAAAAAAAAA' in contents )
76- self .assertTrue ('endpoint_url = %s' % consts .API_PUBLIC_ENDPOINT
77- in contents )
74+ self .assertTrue ('endpoint_url = %s' % consts .API_PUBLIC_ENDPOINT in contents )
75+
7876
7977 @mock .patch ('SoftLayer.CLI.formatting.confirm' )
8078 @mock .patch ('SoftLayer.CLI.environment.Environment.getpass' )
@@ -115,6 +113,17 @@ def test_get_user_input_custom(self, mocked_input, getpass):
115113
116114 self .assertEqual (endpoint_url , 'custom-endpoint' )
117115
116+ @mock .patch ('SoftLayer.CLI.environment.Environment.getpass' )
117+ @mock .patch ('SoftLayer.CLI.environment.Environment.input' )
118+ def test_github_1074 (self , mocked_input , getpass ):
119+ """Tests to make sure directly using an endpoint works"""
120+ getpass .return_value = 'A' * 64
121+ mocked_input .side_effect = ['user' , 'test-endpoint' , 0 ]
122+
123+ _ , _ , endpoint_url , _ = config .get_user_input (self .env )
124+
125+ self .assertEqual (endpoint_url , 'test-endpoint' )
126+
118127 @mock .patch ('SoftLayer.CLI.environment.Environment.getpass' )
119128 @mock .patch ('SoftLayer.CLI.environment.Environment.input' )
120129 def test_get_user_input_default (self , mocked_input , getpass ):
0 commit comments