def METHOD_NAME(self, mock_read_etc_services):
    yelpsoa_config_root = "fake_yelpsoa_config_root"
    walk_return = [
        ("fake_root1", "fake_dir1", ["smartstack.yaml"]),
        ("fake_root2", "fake_dir2", ["smartstack.yaml"]),
        ("fake_root3", "fake_dir3", ["smartstack.yaml"]),
    ]
    mock_walk = mock.Mock(return_value=walk_return)
    # See http://www.voidspace.org.uk/python/mock/examples.html#multiple-calls-with-different-effects
    get_smartstack_proxy_ports_from_file_returns = [
        {20001, 20003},
        {20002},
        {55555},  # bogus out-of-range value
    ]
    def get_smarstack_proxy_ports_from_file_side_effect(*args):
        return get_smartstack_proxy_ports_from_file_returns.pop(0)
    mock_get_smartstack_proxy_ports_from_file = mock.Mock(
        side_effect=get_smarstack_proxy_ports_from_file_side_effect
    )
    with mock.patch("os.walk", mock_walk, autospec=None):
        with mock.patch(
            "paasta_tools.cli.fsm.autosuggest._get_smartstack_proxy_ports_from_file",
            mock_get_smartstack_proxy_ports_from_file,
            autospec=None,
        ):
            actual = autosuggest.suggest_smartstack_proxy_port(
                yelpsoa_config_root, range_min=20001, range_max=20004
            )
    # Sanity check: our mock was called once for each legit port file in
    # walk_return
    assert mock_get_smartstack_proxy_ports_from_file.call_count == 3
    # What we came here for: the actual output of the function under test
    assert actual == 20004  # The only available integer in [20001, 20004]