예제 #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, "")