summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorSybren A. Stüvel <sybren@stuvel.eu>2011-07-30 21:58:13 +0200
committerSybren A. Stüvel <sybren@stuvel.eu>2011-07-30 21:58:13 +0200
commit5524a39f4114430ac4dee2f81fc436ac3b3a815b (patch)
tree948d4225f72ec0e6209983db0906d71e17565b30 /tests
parent006cbf132323c271d2ec3490c4001dcf2aa13721 (diff)
downloadrsa-git-5524a39f4114430ac4dee2f81fc436ac3b3a815b.tar.gz
Added reading of varblocks
Diffstat (limited to 'tests')
-rw-r--r--tests/test_blocks.py10
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)
+
+