aboutsummaryrefslogtreecommitdiff
path: root/wqflask
diff options
context:
space:
mode:
authorBonfaceKilz2020-10-28 23:11:59 +0300
committerBonfaceKilz2020-10-28 23:11:59 +0300
commit629553ec992c59500ef64b04b8fc9fb0500bcaee (patch)
tree588522c56e3f9aaaccb9ed39c284cdc6bb25f8c9 /wqflask
parentd02ba48694b7e12beb11a22b6b203aad65009d60 (diff)
downloadgenenetwork2-629553ec992c59500ef64b04b8fc9fb0500bcaee.tar.gz
Add tests for cookie verification
Diffstat (limited to 'wqflask')
-rw-r--r--wqflask/tests/wqflask/test_user_session.py15
1 files changed, 15 insertions, 0 deletions
diff --git a/wqflask/tests/wqflask/test_user_session.py b/wqflask/tests/wqflask/test_user_session.py
new file mode 100644
index 00000000..ebb0334a
--- /dev/null
+++ b/wqflask/tests/wqflask/test_user_session.py
@@ -0,0 +1,15 @@
+"""Test cases for some methods in user_session.py"""
+
+import unittest
+from wqflask.user_session import verify_cookie
+
+
+class TestUserSession(unittest.TestCase):
+ def test_verify_cookie(self):
+ """
+ Test cookie verification
+ """
+ self.assertEqual(
+ "3f4c1dbf-5b56-4260-87d6-f35445bda37e",
+ verify_cookie(("3f4c1dbf-5b56-4260-87d6-"
+ "f35445bda37e:af4fcf5eace9e7c864ce")))