We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 7b439d3 commit 387a29cCopy full SHA for 387a29c
pandas/tests/io/test_common.py
@@ -417,3 +417,11 @@ def test_is_fsspec_url():
417
assert not icom.is_fsspec_url("random:pandas/somethingelse.com")
418
assert not icom.is_fsspec_url("/local/path")
419
assert not icom.is_fsspec_url("relative/local/path")
420
+
421
422
+def test_urlopen_headers():
423
+ headers = {"User-Agent": "Pandas 1.1.0"}
424
+ # this returns the User-Agent
425
+ url = "http://ifconfig.me/ua"
426
+ r = icom.urlopen(url, headers=headers)
427
+ assert r.read().decode("utf-8") == headers["User-Agent"]
0 commit comments