Пример #1
0
    def test_format_aws_credentials_with_prefix(self):
        credentials = {"AWS_ACCESS_KEY_ID": "testAccessKey"}
        self.assertEqual(format_aws_credentials(credentials),
                         "AWS_ACCESS_KEY_ID='testAccessKey'")

        self.assertEqual(format_aws_credentials(credentials, prefix='export '),
                         "export AWS_ACCESS_KEY_ID='testAccessKey'")

        self.assertEqual(format_aws_credentials(credentials, prefix='set '),
                         "set AWS_ACCESS_KEY_ID='testAccessKey'")
Пример #2
0
    def test_format_aws_credentials_with_prefix(self):
        credentials = {"AWS_ACCESS_KEY_ID": "testAccessKey"}
        self.assertEqual(format_aws_credentials(credentials),
                         "AWS_ACCESS_KEY_ID='testAccessKey'")

        self.assertEqual(format_aws_credentials(credentials, prefix='export '),
                         "export AWS_ACCESS_KEY_ID='testAccessKey'")

        self.assertEqual(format_aws_credentials(credentials, prefix='set '),
                         "set AWS_ACCESS_KEY_ID='testAccessKey'")
Пример #3
0
    def test_format_aws_credentials_multline(self):
        input_ = {"AWS_ACCESS_KEY_ID": "testAccessKey",
                  "AWS_SECRET_ACCESS_KEY": "not so secret"}

        self.assertEqual(format_aws_credentials(input_),
                         "AWS_ACCESS_KEY_ID='testAccessKey'\n"
                         "AWS_SECRET_ACCESS_KEY='not so secret'")
Пример #4
0
    def test_format_aws_credentials_multline(self):
        input_ = {
            "AWS_ACCESS_KEY_ID": "testAccessKey",
            "AWS_SECRET_ACCESS_KEY": "not so secret"
        }

        self.assertEqual(
            format_aws_credentials(input_),
            "AWS_ACCESS_KEY_ID='testAccessKey'\n"
            "AWS_SECRET_ACCESS_KEY='not so secret'")