Example #1
0
    def test_must_set_all_aws_session_properties(self, boto_mock):
        profile = "foo"
        region = "myregion"
        ctx = Context()

        ctx.profile = profile
        ctx.region = region
        boto_mock.setup_default_session.assert_called_with(region_name=region, profile_name=profile)
Example #2
0
    def test_must_set_aws_profile_in_boto_session(self, boto_mock):
        profile = "foo"

        ctx = Context()

        ctx.profile = profile
        self.assertEqual(ctx.profile, profile)
        boto_mock.setup_default_session.assert_called_with(region_name=None, profile_name=profile, botocore_session=ANY)
Example #3
0
    def test_must_set_aws_profile_in_boto_session(self, boto_mock):
        profile = "foo"

        ctx = Context()

        ctx.profile = profile
        self.assertEquals(ctx.profile, profile)
        boto_mock.setup_default_session.assert_called_with(region_name=None, profile_name=profile)
Example #4
0
    def test_must_set_all_aws_session_properties(self, boto_mock):
        profile = "foo"
        region = "myregion"
        ctx = Context()

        ctx.profile = profile
        ctx.region = region
        boto_mock.setup_default_session.assert_called_with(region_name=region, profile_name=profile)