Esempio n. 1
0
 def test_dict_to_cookie_str(self):
     cookie_str = "|"
     dic = {
         'foo': "2013-06-04T01:08:58.262162",
         'bar': "2013-06-04T01:08:58",
     }
     cookie_str = dict_to_cookie_str(dic)
     self.assertEqual(parse_cookie_str(cookie_str), dic)
Esempio n. 2
0
 def test_parse_cookie_str(self):
     cookie_str = "foo=2013-06-04T01:08:58.262162|bar=2013-06-04T01:08:58"
     res = parse_cookie_str(cookie_str)
     dic = {
         'foo': "2013-06-04T01:08:58.262162",
         'bar': "2013-06-04T01:08:58",
     }
     self.assertEqual(res, dic)