summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorGian Mario Tagliaretti <gianmt@gnome.org>2009-12-31 15:25:10 +0100
committerGian Mario Tagliaretti <gianmt@gnome.org>2009-12-31 15:25:10 +0100
commit3829d7667b19126fb74562b28d271e616b154c99 (patch)
tree8f35d003c104aac6d5d2dfbdd88506f599f322ee /tests
parent5bec72f34ea75bc56158cae5c39d61a2a4e7e601 (diff)
downloadpygobject-3829d7667b19126fb74562b28d271e616b154c99.tar.gz
pygobject-3829d7667b19126fb74562b28d271e616b154c99.tar.xz
pygobject-3829d7667b19126fb74562b28d271e616b154c99.zip
Wrap gio.SocketListener.add_address() and add a test
Diffstat (limited to 'tests')
-rw-r--r--tests/test_gsocket.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/test_gsocket.py b/tests/test_gsocket.py
index 9ac2398..b5b3694 100644
--- a/tests/test_gsocket.py
+++ b/tests/test_gsocket.py
@@ -39,3 +39,12 @@ class TestSocketAddress(unittest.TestCase):
loop = glib.MainLoop()
loop.run()
+
+class TestSocketListener(unittest.TestCase):
+ def test_socket_listener_add_address(self):
+ address = gio.inet_address_new_from_string("127.0.0.1")
+ inetsock = gio.InetSocketAddress(address, 1024)
+
+ listener = gio.SocketListener()
+ effective = listener.add_address(inetsock, gio.SOCKET_TYPE_STREAM, gio.SOCKET_PROTOCOL_TCP)
+ self.failUnless(isinstance(effective, gio.InetSocketAddress))