def test_config(self): loaded_config = raw_config_parse(path('aws_config')) self.assertIn('default', loaded_config) self.assertIn('profile "personal"', loaded_config) # A _path key is inserted that is the full path of the # config file. self.assertEqual(loaded_config['_path'], path('aws_config'))
def test_config_parse_error(self): filename = path('aws_config_bad') with self.assertRaises(botocore.exceptions.ConfigParseError): raw_config_parse(filename)
def test_config_not_found(self): with self.assertRaises(botocore.exceptions.ConfigNotFound): loaded_config = raw_config_parse(path('aws_config_notfound'))
def test_config(self): loaded_config = raw_config_parse(path('aws_config')) self.assertIn('default', loaded_config) self.assertIn('profile "personal"', loaded_config)