[telepathy-gabble/telepathy-gabble-0.8] test-fallback-socks5-proxy: test that the list of proxies is recycled

Guillaume Desmottes guillaume.desmottes at collabora.co.uk
Fri Dec 4 05:31:36 PST 2009


---
 tests/twisted/test-fallback-socks5-proxy.py |    8 ++++++++
 1 files changed, 8 insertions(+), 0 deletions(-)

diff --git a/tests/twisted/test-fallback-socks5-proxy.py b/tests/twisted/test-fallback-socks5-proxy.py
index 7e43f23..e95f091 100644
--- a/tests/twisted/test-fallback-socks5-proxy.py
+++ b/tests/twisted/test-fallback-socks5-proxy.py
@@ -272,6 +272,14 @@ def cache_full(q, bus, conn, stream):
     # the oldest proxy has been removed
     assertDoesNotContain(oldest_proxy, proxies)
 
+     #send another file. We already queried all the proxies so the list is recycled
+    send_file_to_alice(q, conn)
+
+    # the oldest proxy is re-requested first
+    return_event, e1, = q.expect_many(
+        EventPattern('dbus-return', method='CreateChannel'),
+        EventPattern('stream-iq', to=oldest_proxy[0], iq_type='get', query_ns=ns.BYTESTREAMS))
+
 if __name__ == '__main__':
     params = {'fallback-socks5-proxies': ['fallback1-proxy.localhost', 'fallback2-proxy.localhost']}
     exec_test(offer_dbus_tube, params=params)
-- 
1.5.6.5




More information about the telepathy-commits mailing list