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