示例#1
0
    def test_db_value_properties(self):
        g = GlueJob('example/glue_jobs/simple_etl_job/',
                    bucket='alpha-everyone',
                    job_role='alpha_user_isichei',
                    job_arguments={'--test_arg': 'this is a test'})

        g.job_name = 'changed_job_name'
        self.assertEqual(g.job_name, 'changed_job_name')

        g.bucket = "new-bucket"
        self.assertEqual(g.bucket, "new-bucket")
        with self.assertRaises(ValueError):
            g.bucket = "s3://new-bucket"

        g.job_role = 'alpha_new_user'
        self.assertEqual(g.job_role, 'alpha_new_user')

        g.job_arguments = {"--new_args": "something"}
        self.assertEqual(g.job_arguments["--new_args"], "something")
示例#2
0
    def test_db_value_properties(self):
        g = GlueJob(
            "example/glue_jobs/simple_etl_job/",
            bucket="alpha-everyone",
            job_role="alpha_user_isichei",
            job_arguments={"--test_arg": "this is a test"},
        )

        g.job_name = "changed_job_name"
        self.assertEqual(g.job_name, "changed_job_name")

        g.bucket = "new-bucket"
        self.assertEqual(g.bucket, "new-bucket")
        with self.assertRaises(ValueError):
            g.bucket = "s3://new-bucket"

        g.job_role = "alpha_new_user"
        self.assertEqual(g.job_role, "alpha_new_user")

        g.job_arguments = {"--new_args": "something"}
        self.assertEqual(g.job_arguments["--new_args"], "something")