Replace http.client with HTTPX

This commit is contained in:
Hugo van Kemenade 2021-11-21 23:47:01 +02:00
parent 26db2bc68b
commit 44ade40579
3 changed files with 35 additions and 55 deletions

View file

@ -1,4 +1,3 @@
#!/usr/bin/env python
"""
Integration (not unit) tests for pylast.py
"""
@ -297,13 +296,13 @@ class TestPyLastNetwork(TestPyLastWithLastFm):
def test_proxy(self):
# Arrange
host = "https://example.com"
host = "example.com"
port = 1234
# Act / Assert
self.network.enable_proxy(host, port)
assert self.network.is_proxy_enabled()
assert self.network._get_proxy() == ["https://example.com", 1234]
assert self.network._get_proxy() == "example.com:1234"
self.network.disable_proxy()
assert not self.network.is_proxy_enabled()