diff options
author | Robey Pointer <robey@lag.net> | 2004-09-25 21:32:53 +0000 |
---|---|---|
committer | Robey Pointer <robey@lag.net> | 2004-09-25 21:32:53 +0000 |
commit | 3e644a94f17fbf0a683bf298f865cd62694add19 (patch) | |
tree | 3b67d3361de77ca3c4a5bccbf6c06b65b516a0f5 /tests/test_message.py | |
parent | 12287b3e0e95664a383902b69a0881775b550feb (diff) |
[project @ Arch-1:robey@lag.net--2003-public%secsh--dev--1.0--patch-88]
add Message.rewind()
add rewind() method to Message, which just resets the pointer so you can
start reading from the beginning again. this is useful for some tests.
Diffstat (limited to 'tests/test_message.py')
-rw-r--r-- | tests/test_message.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/tests/test_message.py b/tests/test_message.py index 9e4f2a42..218ab529 100644 --- a/tests/test_message.py +++ b/tests/test_message.py @@ -95,4 +95,8 @@ class MessageTest (unittest.TestCase): self.assertEquals(msg.get_mpint(), 0x1122334455L) self.assertEquals(msg.get_so_far(), self.__d[:13]) self.assertEquals(msg.get_remainder(), self.__d[13:]) + msg.rewind() + self.assertEquals(msg.get_int(), 5) + self.assertEquals(msg.get_so_far(), self.__d[:4]) + self.assertEquals(msg.get_remainder(), self.__d[4:]) |