X-Git-Url: http://www.git.cypherpunks.ru/?a=blobdiff_plain;f=tests%2Ftest_pyderasn.py;h=8b93827d1e14a4d28155925dd5660015704aff0e;hb=2d45a224943c79e95cbd4913b44420788bc6c17d;hp=62954d78762a162f901f33a649b957b0c8063e6b;hpb=5b15d6d7bdfe67388f01fd2ab1638f8c02c1294b;p=pyderasn.git diff --git a/tests/test_pyderasn.py b/tests/test_pyderasn.py index 62954d7..8b93827 100644 --- a/tests/test_pyderasn.py +++ b/tests/test_pyderasn.py @@ -1,5 +1,5 @@ # coding: utf-8 -# PyDERASN -- Python ASN.1 DER codec with abstract structures +# PyDERASN -- Python ASN.1 DER/BER codec with abstract structures # Copyright (C) 2017-2018 Sergey Matveev # # This program is free software: you can redistribute it and/or modify @@ -1519,8 +1519,7 @@ class TestBitString(CommonMixin, TestCase): self.assertEqual(len(encoded), obj.tlvlen) def test_x690_vector(self): - vector_payload = hexdec("0A3B5F291CD0") - vector = BitString((len(vector_payload) * 8 - 4, vector_payload)) + vector = BitString("'0A3B5F291CD'H") obj, tail = BitString().decode(hexdec("0307040A3B5F291CD0")) self.assertSequenceEqual(tail, b"") self.assertEqual(obj, vector)