import re


def request_url_to_fixture(url: str):
    """Convert a URL path to a fixtures filename ('/account/events' -> 'account_events')"""
    params = url.split('?')

    return '_'.join([param for param in re.split('/|-', params[0]) if param != ''])