Beispiel #1
0
 def test_profile(self):
     self.assertEqual(self.session.get_variable('profile'), 'foo')
     self.assertEqual(self.session.get_variable('region'), 'moon-west-1')
     self.session.get_variable('profile') == 'default'
     saved_region = self.environ['FOO_REGION']
     del self.environ['FOO_REGION']
     saved_profile = self.environ['FOO_PROFILE']
     del self.environ['FOO_PROFILE']
     session = botocore.session.get_session(self.env_vars)
     self.assertEqual(session.get_variable('profile'), None)
     self.assertEqual(session.get_variable('region'), 'us-west-1')
     self.environ['FOO_REGION'] = saved_region
     self.environ['FOO_PROFILE'] = saved_profile
Beispiel #2
0
 def test_profile(self):
     assert self.session.get_variable('profile') == 'foo'
     assert self.session.get_variable('region') == 'moon-west-1'
     self.session.get_variable('profile') == 'default'
     saved_region = os.environ['FOO_REGION']
     del os.environ['FOO_REGION']
     saved_profile = os.environ['FOO_PROFILE']
     del os.environ['FOO_PROFILE']
     session = botocore.session.get_session(self.env_vars)
     assert session.get_variable('profile') == None
     assert session.get_variable('region') == 'us-west-1'
     os.environ['FOO_REGION'] = saved_region
     os.environ['FOO_PROFILE'] = saved_profile
Beispiel #3
0
 def test_profile(self):
     self.assertEqual(self.session.get_variable('profile'), 'foo')
     self.assertEqual(self.session.get_variable('region'), 'moon-west-1')
     self.session.get_variable('profile') == 'default'
     saved_region = self.environ['FOO_REGION']
     del self.environ['FOO_REGION']
     saved_profile = self.environ['FOO_PROFILE']
     del self.environ['FOO_PROFILE']
     session = botocore.session.get_session(self.env_vars)
     self.assertEqual(session.get_variable('profile'), None)
     self.assertEqual(session.get_variable('region'), 'us-west-1')
     self.environ['FOO_REGION'] = saved_region
     self.environ['FOO_PROFILE'] = saved_profile
Beispiel #4
0
 def test_variable_does_not_exist(self):
     session = botocore.session.get_session(self.env_vars)
     self.assertIsNone(session.get_variable('foo/bar'))
Beispiel #5
0
 def test_variable_does_not_exist(self):
     session = create_session(session_vars=self.env_vars)
     self.assertIsNone(session.get_variable('foo/bar'))
Beispiel #6
0
 def test_variable_does_not_exist(self):
     session = create_session(session_vars=self.env_vars)
     self.assertIsNone(session.get_variable('foo/bar'))