aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorIlya Etingof <ietingof@redhat.com>2017-04-10 18:38:17 +0200
committerIlya Etingof <ietingof@redhat.com>2017-04-10 18:38:17 +0200
commitb2dbbd8a62dcf014454fe26107b4a4a54350c364 (patch)
tree4646876adb4673f86522beb9fa0e7f7ecbf46f4a /tests
parentb8085ece44a9c8eaf63b803b82b0a281e95357c4 (diff)
downloadpyasn1-b2dbbd8a62dcf014454fe26107b4a4a54350c364.tar.gz
allowed DER chunked encoding
Diffstat (limited to 'tests')
-rw-r--r--tests/codec/der/test_encoder.py9
1 files changed, 3 insertions, 6 deletions
diff --git a/tests/codec/der/test_encoder.py b/tests/codec/der/test_encoder.py
index 9f06708..0611dc8 100644
--- a/tests/codec/der/test_encoder.py
+++ b/tests/codec/der/test_encoder.py
@@ -31,12 +31,9 @@ class OctetStringEncoderTestCase(unittest.TestCase):
assert 0, 'Indefinite length encoding tolerated'
def testChunkedMode(self):
- try:
- x = encoder.encode(univ.OctetString('Quick brown'), maxChunkSize=2)
- except PyAsn1Error:
- pass
- else:
- assert 0, 'Chunked encoding tolerated'
+ assert encoder.encode(
+ univ.OctetString('Quick brown'), maxChunkSize=2
+ ) == ints2octs((4, 11, 81, 117, 105, 99, 107, 32, 98, 114, 111, 119, 110))
class BitStringEncoderTestCase(unittest.TestCase):