def testBigQueryOutputOk(self):
    pl = linter.PipelineLinter(
        '{"outputs": [{"type": "BigQueryOutput",'
        ' "destinationTable": {"projectId": "123", "tableId": "abc",'
        ' "datasetId": "xyz"}, "schema": {"fields": [{"type": "STRING"}]},'
        ' "sources": ["gs:/b2/o2"]}]}')
    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': {'outputs': [{
            u'BigQueryOutput' % linter.StageLinter.CHECK_TYPE_FMT:
            {'pass': True},
            linter.StageLinter.CHECK_FIELD_EXISTS_FMT % 'sources':
            {'pass': True},
            linter.StageLinter.CHECK_TYPE_FMT % 'destinationTable':
            {'pass': True},
            linter.StageLinter.CHECK_TYPE_FMT % 'schema': {'pass': True},
            linter.StageLinter.CHECK_TYPE_FMT % 'schema.fields': {'pass': True},
            linter.StageLinter.CHECK_FIELD_EXISTS_FMT % 'destinationTable':
            {'pass': True},
            linter.StageLinter.CHECK_FIELD_EXISTS_FMT % 'schema':
            {'pass': True},
            linter.StageLinter.CHECK_FIELD_EXISTS_FMT %
            'destinationTable.projectId': {'pass': True},
            linter.StageLinter.CHECK_FIELD_EXISTS_FMT %
            'destinationTable.tableId': {'pass': True},
            linter.StageLinter.CHECK_FIELD_EXISTS_FMT %
            'destinationTable.datasetId': {'pass': True},
            linter.StageLinter.CHECK_FIELD_EXISTS_FMT %
            'schema.fields': {'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.testBigQueryOutputOk/swapped operands of `%`