Example #1
0
def test_aspen_favicon_doesnt_get_clobbered_by_virtual_path():
    mk('%value')
    request = StubRequest.from_fs('/favicon.ico')
    gauntlet.run_through(request, gauntlet.not_found)
    expected = {}
    actual = request.line.uri.path
    assert actual == expected, actual
Example #2
0
def test_aspen_favicon_doesnt_get_clobbered_by_virtual_path():
    mk('%value')
    request = StubRequest.from_fs('/favicon.ico')
    gauntlet.run_through(request, gauntlet.not_found)
    expected = {}
    actual = request.line.uri.path
    assert actual == expected, actual
Example #3
0
def check_trailing_slash(path):
    """Given an urlpath, return a filesystem path per gauntlet.trailing_slash.
    """
    request = StubRequest.from_fs(path)
    gauntlet.run_through(request, gauntlet.trailing_slash)
    return request
Example #4
0
def check_virtual_paths(path):
    """Given an urlpath, return a filesystem path per gauntlet.virtual_paths.
    """
    request = StubRequest.from_fs(path)
    gauntlet.run_through(request, gauntlet.virtual_paths)
    return request
Example #5
0
def check_index(path, *a):
    """Given a uripath, return a filesystem path per gauntlet.index.
    """
    request = StubRequest.from_fs(path, *a)
    gauntlet.run_through(request, gauntlet.index)
    return request
Example #6
0
def check_indirect_negotiation(path):
    """Given an urlpath, return a filesystem path per gauntlet.virtual_paths.
    """
    request = StubRequest.from_fs(path)
    gauntlet.run_through(request, gauntlet.indirect_negotiation)
    return request
Example #7
0
def check_trailing_slash(path):
    """Given an urlpath, return a filesystem path per gauntlet.trailing_slash.
    """
    request = StubRequest.from_fs(path)
    gauntlet.run_through(request, gauntlet.trailing_slash)
    return request
Example #8
0
def check_virtual_paths(path):
    """Given an urlpath, return a filesystem path per gauntlet.virtual_paths.
    """
    request = StubRequest.from_fs(path)
    gauntlet.run_through(request, gauntlet.virtual_paths)
    return request
Example #9
0
def check_indirect_negotiation(path):
    """Given an urlpath, return a filesystem path per gauntlet.indirect_negotiation.
    """
    request = StubRequest.from_fs(path)
    gauntlet.run_through(request, gauntlet.indirect_negotiation)
    return request
Example #10
0
def check_index(path, *a):
    """Given a uripath, return a filesystem path per gauntlet.index.
    """
    request = StubRequest.from_fs(path, *a)
    gauntlet.run_through(request, gauntlet.index)
    return request