Example #1
0
 def test_split_msg_one_line(self):
     msg = 'a' * 160 + 'b' * 20
     chunks = split_msg(msg)
     assert len(chunks) is 2
Example #2
0
 def test_split_msg_multi_chunk(self):
     msg = 'a' * 500
     chunks = split_msg(msg)
     assert len(chunks) is 4
Example #3
0
 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
Example #4
0
 def test_split_msg_one_chunk(self):
     msg = 'a' * 130
     chunks = split_msg(msg)
     assert len(chunks) is 1
Example #5
0
 def test_split_msg_one_line(self):
     msg = 'a' * 160 + 'b' * 20
     chunks = split_msg(msg)
     assert len(chunks) is 2
Example #6
0
 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
Example #7
0
 def test_split_msg_multi_chunk(self):
     msg = 'a' * 500
     chunks = split_msg(msg)
     assert len(chunks) is 4
Example #8
0
 def test_split_msg_one_chunk(self):
     msg = 'a' * 130
     chunks = split_msg(msg)
     assert len(chunks) is 1