aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorRenato Filho <renato.filho@openbossa.org>2010-04-13 15:13:19 -0300
committerRenato Filho <renato.filho@openbossa.org>2010-04-13 16:04:17 -0300
commit653bb5149b0e29bbad994568954a1c937fe0b248 (patch)
treeab5f0c689588a358c76dcf1046a089451f80eec6 /tests
parent27458bcd2f87e29dbdb60ba0de463261fedd3afa (diff)
Created unittest for QtXmlPatterns.
Reviewer: Hugo Parente Lima <hugo.lima@openbossa.org>, Luciano Wolf <luciano.wolf@openbossa.org>
Diffstat (limited to 'tests')
-rw-r--r--tests/qtxmlpatterns/import_test.py30
1 files changed, 30 insertions, 0 deletions
diff --git a/tests/qtxmlpatterns/import_test.py b/tests/qtxmlpatterns/import_test.py
new file mode 100644
index 000000000..5bab9755c
--- /dev/null
+++ b/tests/qtxmlpatterns/import_test.py
@@ -0,0 +1,30 @@
+#!/usr/bin/python
+
+import unittest
+from PySide.QtCore import *
+from PySide.QtXmlPatterns import QXmlSchema
+from helper import UsesQCoreApplication
+
+class QXmlPatternsTest(UsesQCoreApplication):
+
+ def testSchema(self):
+ data = QByteArray('''<?xml version=\"1.0\" encoding=\"UTF-8\"?>
+ <xsd:schema
+ xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\"
+ xmlns=\"http://qt.nokia.com/xmlschematest\"
+ targetNamespace=\"http://qt.nokia.com/xmlschematest\"
+ version=\"1.0\"
+ elementFormDefault=\"qualified\">
+ </xsd:schema>''')
+
+ buf = QBuffer(data)
+ buf.open(QIODevice.ReadOnly)
+
+ schema = QXmlSchema()
+ schema.load(buf)
+ self.assert_(schema.isValid())
+
+
+if __name__ == '__main__':
+ unittest.main()
+