def test_del_all(): qs = 'a=1&a=2&b=2' ret = mod.del_qparam(qs, 'a') assert 'a=1' not in str(ret) assert 'a=2' not in str(ret) assert 'b=2' in str(ret)
def test_del_qparam_default(request): request.query_string = 'a=1&b=2' ret = mod.del_qparam(None, 'a') assert 'a=1' not in str(ret) assert 'b=2' in str(ret)
def test_del_qparam(): qs = 'a=1&b=3&c=4' ret = mod.del_qparam(qs, 'a') assert 'a=1' not in str(ret)