示例#1
0
 def test_unpad_evil_message(self):
     from r2.lib.tracking import _unpad_message
     evil = ("a" * 88) + chr(57)
     result = _unpad_message(evil)
     self.assertEquals(result, "")
示例#2
0
 def test_padding_roundtrip(self):
     from r2.lib.tracking import _unpad_message, _pad_message
     tested = _unpad_message(_pad_message(MESSAGE))
     self.assertEquals(MESSAGE, tested)
示例#3
0
 def test_padding_roundtrip(self):
     from r2.lib.tracking import _unpad_message, _pad_message
     tested = _unpad_message(_pad_message(MESSAGE))
     self.assertEquals(MESSAGE, tested)
示例#4
0
 def test_unpad_empty_message(self):
     from r2.lib.tracking import _unpad_message
     unpadded = _unpad_message("")
     self.assertEquals(unpadded, "")
示例#5
0
 def test_unpad_evil_message(self):
     from r2.lib.tracking import _unpad_message
     evil = ("a" * 88) + chr(57)
     result = _unpad_message(evil)
     self.assertEquals(result, "")
示例#6
0
 def test_unpad_empty_message(self):
     from r2.lib.tracking import _unpad_message
     unpadded = _unpad_message("")
     self.assertEquals(unpadded, "")
示例#7
0
 def test_padding_roundtrip(self):
     tested = tracking._unpad_message(tracking._pad_message(MESSAGE))
     self.assertEquals(MESSAGE, tested)
示例#8
0
 def test_unpad_evil_message(self):
     evil = ("a" * 88) + chr(57)
     result = tracking._unpad_message(evil)
     self.assertEquals(result, "")
示例#9
0
 def test_unpad_empty_message(self):
     unpadded = tracking._unpad_message("")
     self.assertEquals(unpadded, "")