projects
/
invirt/packages/python-jsonrpclib.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
b3c011f
)
Add test cases for Unix sockets
upstream
author
Quentin Smith
<quentin@mit.edu>
Sun, 23 Jan 2011 17:32:53 +0000
(12:32 -0500)
committer
Quentin Smith
<quentin@mit.edu>
Sun, 23 Jan 2011 17:34:58 +0000
(12:34 -0500)
tests.py
patch
|
blob
|
history
diff --git
a/tests.py
b/tests.py
index
efce39e
..
7c568b0
100644
(file)
--- a/
tests.py
+++ b/
tests.py
@@
-345,6
+345,18
@@
class InternalTests(unittest.TestCase):
self.assertRaises(raises[i], func)
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 """
""" Test Methods """
def subtract(minuend, subtrahend):
""" Using the keywords from the JSON-RPC v2 doc """