Esempio n. 1
0
def test_add_qparam_default_query_string(request):
    request.query_string = 'a=1&b=2'
    ret = mod.add_qparam(c=3)
    assert 'a=1' in str(ret)
    assert 'b=2' in str(ret)
    assert 'c=3' in str(ret)
Esempio n. 2
0
def test_add_qparam_unicode_coercion():
    qs = 'a=1&b=3&c=4'
    ret = mod.add_qparam(qs, a=0)
    assert 'a=0' in str(ret)
    assert 'a=1' in str(ret)
Esempio n. 3
0
def test_add_qparam_chaining():
    qs = 'a=1&b=3&c=4'
    ret = mod.add_qparam(mod.add_qparam(qs, a=0), d=2)
    assert 'a=0' in str(ret)
    assert 'd=2' in str(ret)
Esempio n. 4
0
def test_add_qparam():
    qs = 'a=1&b=3&c=4'
    ret = mod.add_qparam(qs, a='0')
    assert 'a=0' in str(ret)
    assert 'a=1' in str(ret)