blob: 5166a4f7d34fdb192ea8561ec43d841b42623a22 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
|
import unittest
import solter
class TestSolter(unittest.TestCase):
def test_get_commands_send_data(self):
expected = ['call (int)send(3, "Hello World", 11, 0x4000)']
self.assertEqual(solter.get_commands_send_data(sockfd=3, data="Hello World"), expected)
with self.assertRaises(ValueError):
solter.get_commands_send_data(sockfd=3, data='Hello"World')
with self.assertRaises(ValueError):
solter.get_commands_send_data(sockfd=3, data='Hello\nWorld')
|