From 542155704b737caddf098a7e42f630bfc61a5c2f Mon Sep 17 00:00:00 2001 From: Trygve Aaberge Date: Wed, 5 Oct 2022 20:30:01 +0200 Subject: Add tests for url_encode_if_not_encoded --- _pytest/test_helpers.py | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 _pytest/test_helpers.py (limited to '_pytest') diff --git a/_pytest/test_helpers.py b/_pytest/test_helpers.py new file mode 100644 index 0000000..ee6df35 --- /dev/null +++ b/_pytest/test_helpers.py @@ -0,0 +1,17 @@ +# -*- coding: utf-8 -*- + +from __future__ import print_function, unicode_literals + +from wee_slack import url_encode_if_not_encoded + + +def test_should_url_encode_if_not_encoded(): + value = "=" + encoded = url_encode_if_not_encoded(value) + assert encoded == "%3D" + + +def test_should_not_url_encode_if_encoded(): + value = "%3D" + encoded = url_encode_if_not_encoded(value) + assert encoded == value -- cgit