mirror of
https://github.com/onionshare/onionshare.git
synced 2025-06-01 04:34:27 -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
|
@ -67,7 +67,7 @@ class GuiWebsiteTest(GuiShareTest):
|
|||
|
||||
def view_website(self, public_mode):
|
||||
"""Test that we can download the share"""
|
||||
url = "http://127.0.0.1:{}/".format(self.gui.app.port)
|
||||
url = f"http://127.0.0.1:{self.gui.app.port}/"
|
||||
if public_mode:
|
||||
r = requests.get(url)
|
||||
else:
|
||||
|
@ -83,7 +83,7 @@ class GuiWebsiteTest(GuiShareTest):
|
|||
|
||||
def check_csp_header(self, public_mode, csp_header_disabled):
|
||||
"""Test that the CSP header is present when enabled or vice versa"""
|
||||
url = "http://127.0.0.1:{}/".format(self.gui.app.port)
|
||||
url = f"http://127.0.0.1:{self.gui.app.port}/"
|
||||
if public_mode:
|
||||
r = requests.get(url)
|
||||
else:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue