Allow setting multiple proxies + some cleanup

This commit is contained in:
Hugo van Kemenade 2022-01-24 17:23:08 +02:00
parent da2e7152ba
commit 1a45c3b919
2 changed files with 17 additions and 23 deletions

View file

@ -296,13 +296,12 @@ class TestPyLastNetwork(TestPyLastWithLastFm):
def test_proxy(self):
# Arrange
host = "example.com"
port = 1234
proxy = "http://example.com:1234"
# Act / Assert
self.network.enable_proxy(host, port)
self.network.enable_proxy(proxy)
assert self.network.is_proxy_enabled()
assert self.network._get_proxy() == "example.com:1234"
assert self.network.proxy == "http://example.com:1234"
self.network.disable_proxy()
assert not self.network.is_proxy_enabled()