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