예제 #1
0
파일: sso.py 프로젝트: jamsheedsaeed/awsapp
 def _write_new_config(self, profile):
     config_path = self._session.get_config_variable('config_file')
     config_path = os.path.expanduser(config_path)
     if self._new_values:
         section = profile_to_section(profile)
         self._new_values['__section__'] = section
         self._config_writer.update_config(self._new_values, config_path)
예제 #2
0
 def test_default_profile(self):
     profile = 'default'
     section = profile_to_section(profile)
     self.assertEqual(profile, section)
예제 #3
0
 def test_profile_with_consecutive_spaces(self):
     profile = '    '
     section = profile_to_section(profile)
     self.assertEqual('profile \'    \'', section)
예제 #4
0
 def test_profile_with_tab(self):
     profile = 'tab\ts'
     section = profile_to_section(profile)
     self.assertEqual('profile \'tab\ts\'', section)
예제 #5
0
 def test_profile_with_spaces(self):
     profile = 'my spaced profile'
     section = profile_to_section(profile)
     self.assertEqual('profile \'my spaced profile\'', section)
예제 #6
0
 def test_normal_profile(self):
     profile = 'my-profile'
     section = profile_to_section(profile)
     self.assertEqual('profile my-profile', section)
예제 #7
0
 def test_profile_with_consecutive_spaces(self):
     profile = '    '
     section = profile_to_section(profile)
     self.assertEqual('profile \'    \'', section)
예제 #8
0
 def test_profile_with_tab(self):
     profile = 'tab\ts'
     section = profile_to_section(profile)
     self.assertEqual('profile \'tab\ts\'', section)
예제 #9
0
 def test_profile_with_spaces(self):
     profile = 'my spaced profile'
     section = profile_to_section(profile)
     self.assertEqual('profile \'my spaced profile\'', section)
예제 #10
0
 def test_normal_profile(self):
     profile = 'my-profile'
     section = profile_to_section(profile)
     self.assertEqual('profile my-profile', section)