aboutsummaryrefslogtreecommitdiffstats
path: root/tests/QtDeclarative/bug_997.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/QtDeclarative/bug_997.py')
-rw-r--r--tests/QtDeclarative/bug_997.py24
1 files changed, 24 insertions, 0 deletions
diff --git a/tests/QtDeclarative/bug_997.py b/tests/QtDeclarative/bug_997.py
new file mode 100644
index 000000000..6c3587af6
--- /dev/null
+++ b/tests/QtDeclarative/bug_997.py
@@ -0,0 +1,24 @@
+from PySide import QtCore, QtDeclarative
+
+import unittest
+from helper import adjust_filename, UsesQApplication
+
+
+class TestBug(UsesQApplication):
+ def testQMLFunctionCall(self):
+ ownerData = QtDeclarative.QDeclarativePropertyMap()
+ ownerData.insert('name', 'John Smith')
+ ownerData.insert('phone', '555-5555')
+ ownerData.insert('newValue', '')
+
+ view = QtDeclarative.QDeclarativeView()
+ ctxt = view.rootContext()
+ ctxt.setContextProperty('owner', ownerData)
+ view.setSource(QtCore.QUrl.fromLocalFile(adjust_filename('bug_997.qml', __file__)))
+ view.show()
+ QtCore.QTimer.singleShot(1000, self.app.quit)
+ self.app.exec_()
+ self.assertEqual(ownerData.value('newName'), ownerData.value('name'))
+
+if __name__ == '__main__':
+ unittest.main()