def test_split_msg_one_line(self): msg = 'a' * 160 + 'b' * 20 chunks = split_msg(msg) assert len(chunks) is 2
def test_split_msg_multi_chunk(self): msg = 'a' * 500 chunks = split_msg(msg) assert len(chunks) is 4
def test_split_msg_line_breaks(self): msg = 'a' * 120 + '\n' + 'b' * 40 chunks = split_msg(msg) assert len(chunks) is 2 assert len(chunks[0]) == 120
def test_split_msg_one_chunk(self): msg = 'a' * 130 chunks = split_msg(msg) assert len(chunks) is 1