From 732b9feed5d958b0caa1be77b42ed0befd879e62 Mon Sep 17 00:00:00 2001 From: Daniel Schwarz Date: Thu, 16 Nov 2023 20:24:53 -0500 Subject: [PATCH] Added test for toot.utils.urlencode_url(...) --- tests/test_utils.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/tests/test_utils.py b/tests/test_utils.py index a1bba9a..9dbb579 100644 --- a/tests/test_utils.py +++ b/tests/test_utils.py @@ -3,6 +3,7 @@ import pytest from toot.console import duration from toot.wcstring import wc_wrap, trunc, pad, fit_text +from toot.utils import urlencode_url def test_pad(): @@ -201,3 +202,8 @@ def test_duration(): with pytest.raises(ArgumentTypeError): duration("banana") + + +def test_urlencode_url(): + assert urlencode_url("https://www.example.com") == "https://www.example.com" + assert urlencode_url("https://www.example.com/url%20with%20spaces") == "https://www.example.com/url%20with%20spaces"