예제 #1
0
    def test_set_job_name_with_script_has_params(self):
        """Test Genie 3 adapter setting job name (if not set) with script containing parameters."""

        job = PrestoJob() \
            .script('select * from ${table}') \
            .parameter('table', 'foo.fizz').username('test')

        payload = get_payload(job)

        assert_true('test.PrestoJob.Query' in payload['name'])
예제 #2
0
    def test_set_job_name_with_script_has_params(self):
        """Test Genie 3 adapter setting job name (if not set) with script containing parameters."""

        job = PrestoJob() \
            .script('select * from ${table}') \
            .parameter('table', 'foo.fizz')

        payload = get_payload(job)

        assert_equals(
            'select * from {table}',
            payload['name']
        )