Allow setting multiple proxies + some cleanup
This commit is contained in:
parent
da2e7152ba
commit
1a45c3b919
2 changed files with 17 additions and 23 deletions
|
@ -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()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue