aboutsummaryrefslogtreecommitdiffstats
path: root/_pytest
diff options
context:
space:
mode:
authorTrygve Aaberge <trygveaa@gmail.com>2022-10-05 20:30:01 +0200
committerTrygve Aaberge <trygveaa@gmail.com>2022-10-05 20:30:01 +0200
commit542155704b737caddf098a7e42f630bfc61a5c2f (patch)
treef325bb5817ed57e95231671b2323cdd553f1cef1 /_pytest
parenta4e1c79d3bffa82628bcb91a4121ed5f7600d1e1 (diff)
downloadwee-slack-542155704b737caddf098a7e42f630bfc61a5c2f.tar.gz
Add tests for url_encode_if_not_encoded
Diffstat (limited to '_pytest')
-rw-r--r--_pytest/test_helpers.py17
1 files changed, 17 insertions, 0 deletions
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