@patch('prestoadmin.main.load_config', side_effect=mock_load_topology())
    def test_hosts_on_cli_overrides_topology(self, unused_mock_load):
        try:
            main.main(['--hosts', 'master,slave1', 'topology', 'show'])
        except __HOLE__ as e:
            self.assertEqual(e.code, 0)

        self.assertDefaultRoledefs()
        self.assertEqual(main.state.env.hosts, ['master', 'slave1'])
        self.assertEqual(main.api.env.hosts, ['master', 'slave1'])
dataset/ETHPy150Open prestodb/presto-admin/tests/unit/test_main.py/TestMain.test_hosts_on_cli_overrides_topology