Esempio n. 1
0
def test_attrib_default():
    f = e.css('#div1 a') | e.attrib('nosuch', '') | list
    assert f(create_response(example)) == ['', '', '']
Esempio n. 2
0
def test_attrib_default():
    f = e.css('#div1 a') | e.attrib('nosuch', '') | list
    assert f(create_response(example)) == ['', '', '']
Esempio 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]
Esempio 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]