Beispiel #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, "")
Beispiel #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)
Beispiel #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)
Beispiel #4
0
 def test_unpad_empty_message(self):
     from r2.lib.tracking import _unpad_message
     unpadded = _unpad_message("")
     self.assertEquals(unpadded, "")
Beispiel #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, "")
Beispiel #6
0
 def test_unpad_empty_message(self):
     from r2.lib.tracking import _unpad_message
     unpadded = _unpad_message("")
     self.assertEquals(unpadded, "")
Beispiel #7
0
 def test_padding_roundtrip(self):
     tested = tracking._unpad_message(tracking._pad_message(MESSAGE))
     self.assertEquals(MESSAGE, tested)
Beispiel #8
0
 def test_unpad_evil_message(self):
     evil = ("a" * 88) + chr(57)
     result = tracking._unpad_message(evil)
     self.assertEquals(result, "")
Beispiel #9
0
 def test_unpad_empty_message(self):
     unpadded = tracking._unpad_message("")
     self.assertEquals(unpadded, "")