mirror of
https://github.com/onionshare/onionshare.git
synced 2025-06-04 21:09:18 -04:00
Replace .format with python 3.6 f-strings in tests
This commit is contained in:
parent
25b2f389db
commit
098625621c
8 changed files with 35 additions and 55 deletions
|
@ -12,15 +12,13 @@ class TorGuiShareTest(TorGuiBaseTest, GuiShareTest):
|
|||
(socks_address, socks_port) = self.gui.app.onion.get_tor_socks_port()
|
||||
session = requests.session()
|
||||
session.proxies = {}
|
||||
session.proxies["http"] = "socks5h://{}:{}".format(socks_address, socks_port)
|
||||
session.proxies["http"] = f"socks5h://{socks_address}:{socks_port}"
|
||||
|
||||
# Download files
|
||||
if public_mode:
|
||||
path = "http://{}/download".format(self.gui.app.onion_host)
|
||||
path = f"http://{self.gui.app.onion_host}/download"
|
||||
else:
|
||||
path = "http://{}/{}/download".format(
|
||||
self.gui.app.onion_host, self.gui.share_mode.web.password
|
||||
)
|
||||
path = f"http://{self.gui.app.onion_host}/{self.gui.share_mode.web.password}/download"
|
||||
response = session.get(path, stream=True)
|
||||
QtTest.QTest.qWait(4000)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue