aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorRenato Filho <renato.filho@openbossa.org>2010-05-24 10:23:49 -0300
committerRenato Filho <renato.filho@openbossa.org>2010-05-24 10:24:41 -0300
commit4c3a4cc91fc3dc4b4cadeff5a423ff93624b83de (patch)
tree83a0b043b162c05ad69074c3e39ef1a0c386cfe1 /tests
parentc2b2e579ae58562e620224e1b82cd199edab248b (diff)
QtNetwork 4.7 unittest.
Diffstat (limited to 'tests')
-rw-r--r--tests/qtnetwork/accessManager_test.py23
1 files changed, 23 insertions, 0 deletions
diff --git a/tests/qtnetwork/accessManager_test.py b/tests/qtnetwork/accessManager_test.py
new file mode 100644
index 00000000..9a00e7e7
--- /dev/null
+++ b/tests/qtnetwork/accessManager_test.py
@@ -0,0 +1,23 @@
+
+'''Test cases for QHttp'''
+
+import unittest
+
+from PySide.QtCore import *
+from PySide.QtNetwork import *
+
+from helper import UsesQApplication
+
+class AccessManagerCase(UsesQApplication):
+ def slot_replyFinished(self, reply):
+ self.assertEqual(type(reply), QNetworkReply)
+ self.app.quit()
+
+ def testNetworkRequest(self):
+ manager = QNetworkAccessManager()
+ manager.finished.connect(self.slot_replyFinished)
+ manager.get(QNetworkRequest(QUrl("http://qt.nokia.com")))
+ self.app.exec_()
+
+if __name__ == '__main__':
+ unittest.main()