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