aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorRenato Filho <renato.filho@openbossa.org>2010-05-07 10:50:41 -0300
committerRenato Filho <renato.filho@openbossa.org>2010-05-07 11:48:40 -0300
commit1551821972882def5738220112c3a7487ab80edf (patch)
tree980387c34393c552bca5cb36244a66b4c0816100 /tests
parentdfdad7e0e54bab62825e639b7bacc0679032c236 (diff)
uinit test for signasl with valuetype as pointer.
Reviewer: Hugo Parente Lima <hugo.lima@openbossa.org>, Luciano Wolf <luciano.wolf@openbossa.org>
Diffstat (limited to 'tests')
-rw-r--r--tests/qtnetwork/http_test.py19
1 files changed, 19 insertions, 0 deletions
diff --git a/tests/qtnetwork/http_test.py b/tests/qtnetwork/http_test.py
index 28564f5a0..379ff5dfb 100644
--- a/tests/qtnetwork/http_test.py
+++ b/tests/qtnetwork/http_test.py
@@ -8,6 +8,7 @@ from PySide.QtNetwork import *
from helper import UsesQApplication
+"""
class HttpSignalsCase(UsesQApplication):
'''Test case for launching QHttp signals'''
@@ -42,6 +43,24 @@ class testHttp(UsesQApplication):
http.setHost("qtsoftware.com")
http.request(header)
data = http.read(100)
+"""
+
+class testAuthenticationSignal(UsesQApplication):
+ def onAuthRequest(self, hostname, port, auth):
+ self.assert_(isinstance(auth, QAuthenticator))
+ print auth.realm()
+ self._resultOk = True
+ self.app.exit()
+
+ def testwaitSignal(self):
+ self._resultOk = False
+ http = QHttp()
+ http.setHost("projects.maemo.org", QHttp.ConnectionModeHttps, 0)
+ http.connect(SIGNAL("authenticationRequired(const QString&, quint16, QAuthenticator*)"), self.onAuthRequest)
+ path = QUrl.toPercentEncoding("/index.html", "!$&'()*+,;=:@/")
+ print http.get(path)
+ self.app.exec_()
+ self.assert_(self._resultOk)
if __name__ == '__main__':