diff options
author | Sybren A. St?vel <sybren@stuvel.eu> | 2011-07-30 21:58:13 +0200 |
---|---|---|
committer | Sybren A. St?vel <sybren@stuvel.eu> | 2011-07-30 21:58:13 +0200 |
commit | 6376d160d960c19b834b06dfc1fa0b8fa7d60f6b (patch) | |
tree | 948d4225f72ec0e6209983db0906d71e17565b30 /tests | |
parent | 76e1aa7ec0e054b8eb58a769babaf3de4451d500 (diff) | |
download | rsa-6376d160d960c19b834b06dfc1fa0b8fa7d60f6b.tar.gz |
Added reading of varblocks
Diffstat (limited to 'tests')
-rw-r--r-- | tests/test_blocks.py | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/test_blocks.py b/tests/test_blocks.py index be7b640..8481c3c 100644 --- a/tests/test_blocks.py +++ b/tests/test_blocks.py @@ -56,3 +56,13 @@ class VarintTest(unittest.TestCase): self.assertEqual('\x00', outfile.getvalue()) self.assertEqual(1, written) + +class VarblockTest(unittest.TestCase): + + def test_yield_varblock(self): + infile = StringIO('\x01\x0512345\x06Sybren') + + varblocks = list(blocks.yield_varblocks(infile)) + self.assertEqual(['12345', 'Sybren'], varblocks) + + |