Ejemplo n.º 1
0
def test_urlopener():
    data = urllib_request('https://httpbin.org/headers',
                          headers=[('User-Agent', 'Mozilla/5.0')],
                          verbose=1,
                          retries=RETRIES)
    assert 'Mozilla' in data
Ejemplo n.º 2
0
def test_urlopener():
    data = urllib_request('https://httpbin.org/headers', headers=[('User-Agent', 'Mozilla/5.0')])
    assert 'Mozilla' in data
Ejemplo n.º 3
0
def test_urlopener_no_agent():
    data = urllib_request('https://httpbin.org/headers',
                          verbose=1,
                          retries=RETRIES)
    assert 'User-Agent' not in data
Ejemplo n.º 4
0
def test_urlopener_no_agent():
    data = urllib_request('https://httpbin.org/headers')
    assert 'User-Agent' not in data