def test_list_json_out(self):
        data = self.run_key('-L --out json')
        expect = None
        if self.master_opts['transport'] in ('zeromq', 'tcp'):
            expect = [
                '{',
                '    "minions_rejected": [], ',
                '    "minions_denied": [], ',
                '    "minions_pre": [], ',
                '    "minions": [',
                '        "minion", ',
                '        "sub_minion"',
                '    ]',
                '}',
            ]
        elif self.master_opts['transport'] == 'raet':
            expect = [
                '{',
                '    "accepted": [',
                '        "master", ',
                '        "minion", ',
                '        "sub_minion"',
                '    ], ',
                '    "rejected": [], ',
                '    "pending": []',
                '}'
            ]
        self.assertEqual(data, expect)
test salt-key -L --json-out
dataset/ETHPy150Open saltstack/salt/tests/integration/shell/key.py/KeyTest.test_list_json_out