@pytest.mark.parametrize('path,args,expected', [('/foo?bar=1', {'bar'}, '/foo'), ('/foo?bar=1&baz=2', {'bar'}, '/foo?baz=2'), ('/foo?bar=1&bar=2&bar=3', {'bar': '2'}, '/foo?bar=1&bar=3')])
def test_path_with_removed_args(path, args, expected):
    request = Request.fake(path)
    actual = utils.path_with_removed_args(request, args)
    assert (expected == actual)
    request = Request.fake('/')
    actual = utils.path_with_removed_args(request, args, path=path)
    assert (expected == actual)
@pytest.mark.parametrize('path,args,expected', [('/foo?bar=1', {'bar'}, '/foo'), ('/foo?bar=1&baz=2', {'bar'}, '/foo?baz=2'), ('/foo?bar=1&bar=2&bar=3', {'bar': '2'}, '/foo?bar=1&bar=3')])
def test_path_with_removed_args(path, args, expected):
    request = Request.fake(path)
    actual = utils.path_with_removed_args(request, args)
    assert (expected == actual)
    request = Request.fake('/')
    actual = utils.path_with_removed_args(request, args, path=path)
    assert (expected == actual)