42
42
serialiser = pack.ContainerSerialiser()
43
43
record = serialiser.bytes_record('bytes', [])
44
44
self.assertEqual('B5\n\nbytes', record)
46
46
def test_bytes_record_one_name_with_one_part(self):
47
47
serialiser = pack.ContainerSerialiser()
48
48
record = serialiser.bytes_record('bytes', [('name',)])
49
49
self.assertEqual('B5\nname\n\nbytes', record)
51
51
def test_bytes_record_one_name_with_two_parts(self):
52
52
serialiser = pack.ContainerSerialiser()
53
53
record = serialiser.bytes_record('bytes', [('part1', 'part2')])
54
54
self.assertEqual('B5\npart1\x00part2\n\nbytes', record)
56
56
def test_bytes_record_two_names(self):
57
57
serialiser = pack.ContainerSerialiser()
58
58
record = serialiser.bytes_record('bytes', [('name1',), ('name2',)])