[telepathy-gabble/master] exec_file_transfer_test: use a for

Guillaume Desmottes guillaume.desmottes at collabora.co.uk
Fri Apr 3 09:26:11 PDT 2009


---
 .../twisted/file-transfer/file_transfer_helper.py  |   14 ++++----------
 1 files changed, 4 insertions(+), 10 deletions(-)

diff --git a/tests/twisted/file-transfer/file_transfer_helper.py b/tests/twisted/file-transfer/file_transfer_helper.py
index 4a60963..c71007f 100644
--- a/tests/twisted/file-transfer/file_transfer_helper.py
+++ b/tests/twisted/file-transfer/file_transfer_helper.py
@@ -421,13 +421,7 @@ class SendFileTest(FileTransferTest):
         assert reason == FT_STATE_CHANGE_REASON_NONE
 
 def exec_file_transfer_test(test_cls):
-    test = test_cls(BytestreamIBB)
-    exec_test(test.test)
-    test = test_cls(BytestreamS5B)
-    exec_test(test.test)
-    test = test_cls(BytestreamS5BPidgin)
-    exec_test(test.test)
-    test = test_cls(BytestreamSIFallbackS5CannotConnect)
-    exec_test(test.test)
-    test = test_cls(BytestreamSIFallbackS5WrongHash)
-    exec_test(test.test)
+    for bytestream_cls  in [BytestreamIBB, BytestreamS5B, BytestreamS5BPidgin, BytestreamSIFallbackS5CannotConnect,
+            BytestreamSIFallbackS5WrongHash]:
+        test = test_cls(bytestream_cls)
+        exec_test(test.test)
-- 
1.5.6.5




More information about the telepathy-commits mailing list