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>
This commit is contained in:
parent
39a5a09145
commit
da1759fe98
1 changed files with 4 additions and 0 deletions
|
|
@ -6,6 +6,7 @@ import sys
|
||||||
|
|
||||||
from PySide.QtCore import QObject, SIGNAL, QUrl
|
from PySide.QtCore import QObject, SIGNAL, QUrl
|
||||||
from PySide.QtWebKit import *
|
from PySide.QtWebKit import *
|
||||||
|
from PySide.QtNetwork import QNetworkRequest
|
||||||
|
|
||||||
from helper import adjust_filename, TimedQApplication
|
from helper import adjust_filename, TimedQApplication
|
||||||
|
|
||||||
|
|
@ -61,5 +62,8 @@ class TestLoadFinished(TimedQApplication):
|
||||||
if ok:
|
if ok:
|
||||||
self.called = True
|
self.called = True
|
||||||
|
|
||||||
|
def testNamedArgumentTypeChecking(self):
|
||||||
|
self.assertRaises(TypeError, self.view.load, QNetworkRequest(), body=unicode('foo'))
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
unittest.main()
|
unittest.main()
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue