예제 #1
0
 def test_httponly_after_load(self):
     """
     Test that we can use httponly attribute on cookies that we load
     """
     c = SimpleCookie()
     c.load("name=val")
     c['name']['httponly'] = True
     self.assertTrue(c['name']['httponly'])
예제 #2
0
 def test_decode_2(self):
     """
     Test that we haven't broken normal encoding
     """
     c = SimpleCookie()
     c['test'] = b"\xf0"
     c2 = SimpleCookie()
     c2.load(c.output())
     self.assertEqual(c['test'].value, c2['test'].value)
예제 #3
0
 def test_decode(self):
     """
     Test that we can still preserve semi-colons and commas
     """
     c = SimpleCookie()
     c['test'] = "An,awkward;value"
     c2 = SimpleCookie()
     c2.load(c.output())
     self.assertEqual(c['test'].value, c2['test'].value)