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'])
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'] )