diff options
author | Trygve Aaberge <trygveaa@gmail.com> | 2024-01-06 17:02:32 +0100 |
---|---|---|
committer | Trygve Aaberge <trygveaa@gmail.com> | 2024-02-18 11:32:54 +0100 |
commit | 6b5f46d2e1550d94a9beee4b74dc5ba2b2ad5c2e (patch) | |
tree | c95aa2cef546d8acc04ae8dc580e06d38d7f8f8b /tests | |
parent | af2c56f96d8be2f783332f5e4c502e8d15835b32 (diff) | |
download | wee-slack-6b5f46d2e1550d94a9beee4b74dc5ba2b2ad5c2e.tar.gz |
Use the api_cookie value as the `d` cookie if no keys are specified
Usually, only the `d` cookie is needed, so this allows you to only
specify the value of that cookie without the key if you don't need to
set any other cookies.
Diffstat (limited to 'tests')
-rw-r--r-- | tests/test_get_cookies.py | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/test_get_cookies.py b/tests/test_get_cookies.py index 1e68f58..7222adf 100644 --- a/tests/test_get_cookies.py +++ b/tests/test_get_cookies.py @@ -1,6 +1,16 @@ from slack.util import get_cookies +def test_get_cookies_without_key_value_encoded(): + cookie = get_cookies("a%2Bb") + assert cookie == "d=a%2Bb" + + +def test_get_cookies_without_key_value_not_encoded(): + cookie = get_cookies("a+b") + assert cookie == "d=a%2Bb" + + def test_get_cookies_multiple_keys_value_encoded(): cookie = get_cookies("d=a%2Bb ; d-s=1") assert cookie == "d=a%2Bb; d-s=1" |