@patch('prestoadmin.main.load_config', side_effect=mock_empty_topology())
    def test_topology_defaults_override_fabric_defaults(
            self, unused_mock_load):
        self.remove_runs_once_flag(topology.show)
        try:
            main.main(['topology', 'show'])
        except __HOLE__ as e:
            self.assertEqual(e.code, 0)
        self.assertEqual(['localhost'], main.state.env.hosts)
        self.assertEqual({'coordinator': ['localhost'],
                          'worker': ['localhost'], 'all': ['localhost']},
                         main.state.env.roledefs)
        self.assertEqual(22, main.state.env.port)
        self.assertEqual('root', main.state.env.user)
dataset/ETHPy150Open prestodb/presto-admin/tests/unit/test_main.py/TestMain.test_topology_defaults_override_fabric_defaults