MCPcopy Create free account
hub / github.com/aws/aws-cli / test_profile

Method test_profile

tests/unit/botocore/test_session_legacy.py:119–133  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

117 self.assertEqual(session.get_config_variable('profile'), 'second')
118
119 def test_profile(self):
120 self.assertEqual(self.session.get_config_variable('profile'), 'foo')
121 self.assertEqual(
122 self.session.get_config_variable('region'), 'us-west-11'
123 )
124 self.session.get_config_variable('profile') == 'default'
125 saved_region = self.environ['FOO_REGION']
126 del self.environ['FOO_REGION']
127 saved_profile = self.environ['FOO_PROFILE']
128 del self.environ['FOO_PROFILE']
129 session = create_session(session_vars=self.env_vars)
130 self.assertEqual(session.get_config_variable('profile'), None)
131 self.assertEqual(session.get_config_variable('region'), 'us-west-1')
132 self.environ['FOO_REGION'] = saved_region
133 self.environ['FOO_PROFILE'] = saved_profile
134
135 def test_profile_does_not_exist_raises_exception(self):
136 # Given we have no profile:

Callers

nothing calls this directly

Calls 2

create_sessionFunction · 0.90
get_config_variableMethod · 0.45

Tested by

no test coverage detected