Piotr F. Mieszkowski
a131cd66d3
In particular, move: - test utilities to test/utils; - unit tests to test/modules. Also: start implementing the Lacre daemon test (just a stub for now).
15 lines
358 B
Python
15 lines
358 B
Python
from M2Crypto import BIO
|
|
import unittest
|
|
|
|
class M2CryptoBioMemoryBufferTest(unittest.TestCase):
|
|
def test_memory_buffer_write_str(self):
|
|
mb = BIO.MemoryBuffer()
|
|
mb.write("Foo")
|
|
mb.close()
|
|
self.assertEqual(len(mb), 3)
|
|
|
|
def test_memory_buffer_write_bytes(self):
|
|
mb = BIO.MemoryBuffer()
|
|
mb.write(b"Foo")
|
|
mb.close()
|
|
self.assertEqual(len(mb), 3)
|