Exemple #1
0
class ZombieServerConnectionTests(TestCase):
    address = '/tmp/testing-unix-server'

    def cleanup(self):
        if os.path.exists(self.address):
            os.remove(self.address)

    def setUp(self):
        self.cleanup()
        self.server = EchoServer(self.address)
        self.server.start()
        self.connection = ZombieServerConnection(self.address)

    def tearDown(self):
        self.cleanup()

    def test_send(self):
        res = self.connection.send('Hello world!\n')
        self.assertEqual('Hello world!\n', res)
Exemple #2
0
 def setUp(self):
     self.cleanup()
     self.server = EchoServer(self.address)
     self.server.start()
     self.connection = ZombieServerConnection(self.address)