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