diff options
author | Quentin Smith <quentin@mit.edu> | 2011-01-23 12:32:53 -0500 |
---|---|---|
committer | Quentin Smith <quentin@mit.edu> | 2011-01-23 12:34:58 -0500 |
commit | 84a762b19a301ec66c05d69d765d3db24bb7930b (patch) | |
tree | 68e50ab986b8183342d052b11bb8a687084cb743 /tests.py | |
parent | b3c011fa6a42b9dc419d7c392c663e8302fcb275 (diff) | |
download | jsonrpclib-84a762b19a301ec66c05d69d765d3db24bb7930b.tar.gz |
Add test cases for Unix sockets
Diffstat (limited to 'tests.py')
-rw-r--r-- | tests.py | 12 |
1 files changed, 12 insertions, 0 deletions
@@ -345,6 +345,18 @@ class InternalTests(unittest.TestCase): self.assertRaises(raises[i], func) +class UnixSocketInternalTests(InternalTests): + """ + These tests run the same internal communication tests, but over a + Unix socket instead of a TCP socket. + """ + def setUp(self): + self.port = "/tmp/jsonrpc%d.sock" % (PORTS.pop()) + self.server = server_set_up(addr=self.port, address_family=socket.AF_UNIX) + + def get_client(self): + return Server('unix:%s' % self.port) + """ Test Methods """ def subtract(minuend, subtrahend): """ Using the keywords from the JSON-RPC v2 doc """ |