support/testing: add new test for python-urllib3
Importing urllib3 already allows us to check that for example zlib can
be loaded at runtime.
For good measure, also create the PoolManager object mentioned in the
user guide ([1]), and check that we can normalize a URL like it is
done in urllib3's 'test/test_util.py'.
[1]: https://urllib3.readthedocs.io/en/stable/user-guide.html
Signed-off-by: Raphaël Mélotte <raphael.melotte@mind.be>
Signed-off-by: Julien Olivain <ju.o@free.fr>
(cherry picked from commit 3e931caf84)
Signed-off-by: Thomas Perale <thomas.perale@mind.be>
This commit is contained in:
committed by
Arnout Vandecappelle
parent
fb9716a81b
commit
ca2ff29ba6
9
support/testing/tests/package/sample_python_urllib3.py
Normal file
9
support/testing/tests/package/sample_python_urllib3.py
Normal file
@@ -0,0 +1,9 @@
|
||||
# Check that we can import urllib3 even if we don't use all of it:
|
||||
import urllib3
|
||||
|
||||
# Just check that we can create a PoolManager:
|
||||
http = urllib3.PoolManager()
|
||||
|
||||
# Check if we can normalize URLs:
|
||||
assert urllib3.util.url.parse_url("HTTPS://Example.Com/?Key=Value").url \
|
||||
== "https://example.com/?Key=Value"
|
||||
Reference in New Issue
Block a user