diff --git a/tools/droplets/create.py b/tools/droplets/create.py index 58a411d3d8..c9e0427ca4 100644 --- a/tools/droplets/create.py +++ b/tools/droplets/create.py @@ -288,19 +288,17 @@ Your remote Zulip dev server has been created! def print_production_droplet_instructions(droplet_domain_name: str) -> None: print( - """ + f""" ----- Production droplet created successfully! Connect to the server by running -ssh root@{} +ssh root@{droplet_domain_name} ----- -""".format( - droplet_domain_name - ) +""" ) diff --git a/zerver/webhooks/json/tests.py b/zerver/webhooks/json/tests.py index 3f80f8d0b5..fd97dfd8e1 100644 --- a/zerver/webhooks/json/tests.py +++ b/zerver/webhooks/json/tests.py @@ -16,11 +16,9 @@ class JsonHookTests(WebhookTestCase): original_fixture = json.load(f) expected_topic = "JSON" - expected_message = """```json -{original_fixture} -```""".format( - original_fixture=json.dumps(original_fixture, indent=2) - ) + expected_message = f"""```json +{json.dumps(original_fixture, indent=2)} +```""" self.check_webhook("json_github_push__1_commit", expected_topic, expected_message) def test_json_pingdom_http_up_to_down_message(self) -> None: @@ -31,11 +29,9 @@ class JsonHookTests(WebhookTestCase): original_fixture = json.load(f) expected_topic = "JSON" - expected_message = """```json -{original_fixture} -```""".format( - original_fixture=json.dumps(original_fixture, indent=2) - ) + expected_message = f"""```json +{json.dumps(original_fixture, indent=2)} +```""" self.check_webhook("json_pingdom_http_up_to_down", expected_topic, expected_message) def test_json_sentry_event_for_exception_js_message(self) -> None: @@ -46,9 +42,7 @@ class JsonHookTests(WebhookTestCase): original_fixture = json.load(f) expected_topic = "JSON" - expected_message = """```json -{original_fixture} -```""".format( - original_fixture=json.dumps(original_fixture, indent=2) - ) + expected_message = f"""```json +{json.dumps(original_fixture, indent=2)} +```""" self.check_webhook("json_sentry_event_for_exception_js", expected_topic, expected_message)