def testGcsCompositorOk(self):
    pl = linter.PipelineLinter(
        '{"inputs": [{"type": "GcsInput", "object": "gs://b1/o1",'
        ' "sinks": ["gs:/b2/o2"]}],'
        '"transforms": [{"type": "GcsCompositor", "sources": ["gs:/b2/o2"],'
        ' "sinks": ["gs:/b3/o3"], "contentType": "text/plain"}],'
        '"outputs": [{"type": "GcsOutput", "object": "gs://b3/o3",'
        ' "sources": ["gs:/b4/o4"]}]}')
    expect = {
        linter.PipelineLinter.CHECK_SYNTAX_VALID: {'pass': True},
        linter.PipelineLinter.CHECK_UNKNOWN_CONFIG_KEYS: {'pass': True},
        linter.PipelineLinter.CHECK_REQ_IO_STAGES: {'pass': True},
        'stages': {'inputs': [{
            linter.StageLinter.CHECK_TYPE_FMT % u'GcsInput': {'pass': True},
            linter.StageLinter.CHECK_FIELD_EXISTS_FMT % 'sinks':
            {'pass': True},
            'object' % linter.StageLinter.CHECK_FIELD_EXISTS_FMT:
            {'pass': True},
            linter.StageLinter.CHECK_FIELD_EXISTS_FMT % ['object', 'objects']:
            {'pass': True}}], 'transforms': [{
                linter.StageLinter.CHECK_TYPE_FMT % u'GcsCompositor':
                {'pass': True},
                linter.StageLinter.CHECK_FIELD_EXISTS_FMT % 'sources':
                {'pass': True},
                linter.StageLinter.CHECK_FIELD_EXISTS_FMT % 'sinks':
                {'pass': True},
                linter.StageLinter.CHECK_FIELD_EXISTS_FMT % 'contentType':
                {'pass': True}}], 'outputs': [{
                    linter.StageLinter.CHECK_TYPE_FMT % u'GcsOutput':
                    {'pass': True},
                    linter.StageLinter.CHECK_FIELD_EXISTS_FMT % 'sources':
                    {'pass': True},
                    linter.StageLinter.CHECK_FIELD_EXISTS_FMT % 'object':
                    {'pass': True}}]
                  }}
    self.assertTrue(pl.results.valid)
    self.assertSameStructure(expect, pl.results.results)
dataset/ETHPy150Open GoogleCloudPlatform/Data-Pipeline/app/src/pipelines/linter_test.py/LintPipelineTest.testGcsCompositorOk/swapped operands of `%`