aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarcelo Lira <marcelo.lira@openbossa.org>2011-01-03 16:38:30 -0300
committerHugo Parente Lima <hugo.pl@gmail.com>2012-03-08 16:48:07 -0300
commit1f1f82d5827c3ec77fcd4ee6b6ab47afa0473007 (patch)
tree5e6b9465a4a4e35381862cf7d22fe40620cba83b
parent7a3e7b6f86a514c661bf61c65d1098339e4ffba3 (diff)
Added test case for Bug #572.
Bug #572: Giving unicode value as 'body' argument to WebView's load method crashes python. Reviewed by Hugo Parente <hugo.lima@openbossa.org> Reviewed by Renato Araújo <renato.filho@openbossa.org>
-rw-r--r--tests/QtWebKit/webview_test.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/tests/QtWebKit/webview_test.py b/tests/QtWebKit/webview_test.py
index a6a40fd5c..ab81a306e 100644
--- a/tests/QtWebKit/webview_test.py
+++ b/tests/QtWebKit/webview_test.py
@@ -6,6 +6,7 @@ import sys
from PySide.QtCore import QObject, SIGNAL, QUrl
from PySide.QtWebKit import *
+from PySide.QtNetwork import QNetworkRequest
from helper import adjust_filename, TimedQApplication
@@ -61,5 +62,8 @@ class TestLoadFinished(TimedQApplication):
if ok:
self.called = True
+ def testNamedArgumentTypeChecking(self):
+ self.assertRaises(TypeError, self.view.load, QNetworkRequest(), body=unicode('foo'))
+
if __name__ == '__main__':
unittest.main()