Ejemplo n.º 1
0
def test_attrib_default():
    f = e.css('#div1 a') | e.attrib('nosuch', '') | list
    assert f(create_response(example)) == ['', '', '']
Ejemplo n.º 2
0
def test_attrib_default():
    f = e.css('#div1 a') | e.attrib('nosuch', '') | list
    assert f(create_response(example)) == ['', '', '']
Ejemplo n.º 3
0
def test_attrib():
    f = e.css('#div1 a') | e.attrib('href') | list
    r = create_response(example)
    assert f(r) == ['/1', ' /2 ', None]
Ejemplo n.º 4
0
def test_attrib():
    f = e.css('#div1 a') | e.attrib('href') | list
    r = create_response(example)
    assert f(r) == ['/1', ' /2 ', None]