[Telepathy-commits] [telepathy-haze/master] Add test: connect/fail.py (adapted from Gabble)
Simon McVittie
simon.mcvittie at collabora.co.uk
Fri Jan 16 01:52:35 PST 2009
---
tests/twisted/Makefile.am | 3 ++-
tests/twisted/connect/fail.py | 17 +++++++++++++++++
2 files changed, 19 insertions(+), 1 deletions(-)
create mode 100644 tests/twisted/connect/fail.py
diff --git a/tests/twisted/Makefile.am b/tests/twisted/Makefile.am
index 75d76c3..241b453 100644
--- a/tests/twisted/Makefile.am
+++ b/tests/twisted/Makefile.am
@@ -1,5 +1,6 @@
TWISTED_TESTS = \
- connect/success.py
+ connect/success.py \
+ connect/fail.py
TESTS =
diff --git a/tests/twisted/connect/fail.py b/tests/twisted/connect/fail.py
new file mode 100644
index 0000000..7edad57
--- /dev/null
+++ b/tests/twisted/connect/fail.py
@@ -0,0 +1,17 @@
+
+"""
+Test network error handling.
+"""
+
+import dbus
+
+from hazetest import exec_test
+
+def test(q, bus, conn, stream):
+ conn.Connect()
+ q.expect('dbus-signal', signal='StatusChanged', args=[1, 1])
+ q.expect('dbus-signal', signal='StatusChanged', args=[2, 2])
+
+if __name__ == '__main__':
+ exec_test(test, {'port': dbus.Int32(4243)})
+
--
1.5.6.5
More information about the Telepathy-commits
mailing list