[tracker] functional-tests: Added test for NB#222645
- From: Ivan Frade <ifrade src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [tracker] functional-tests: Added test for NB#222645
- Date: Fri, 28 Jan 2011 12:59:35 +0000 (UTC)
commit a31d4fa961beecba6fa80ed7c6ceb93c67b9d7f6
Author: Ivan Frade <ivan frade nokia com>
Date: Fri Jan 28 14:56:33 2011 +0200
functional-tests: Added test for NB#222645
tests/functional-tests/02-sparql-bugs.py | 22 ++++++++++++++++++++++
1 files changed, 22 insertions(+), 0 deletions(-)
---
diff --git a/tests/functional-tests/02-sparql-bugs.py b/tests/functional-tests/02-sparql-bugs.py
index 62acba9..4937713 100755
--- a/tests/functional-tests/02-sparql-bugs.py
+++ b/tests/functional-tests/02-sparql-bugs.py
@@ -189,5 +189,27 @@ class TrackerStoreSparqlBugsTests (CommonTrackerStoreTest):
"""
self.tracker.update (delete)
+
+ def test_03_NB222645_non_existing_class_resource (self):
+ """
+ NB222645 - Inserting a resource using an non-existing class, doesn't rollback completely
+ """
+ query = "SELECT tracker:modified (?u) ?u WHERE { ?u a nco:Contact }"
+ original_data = self.tracker.query (query)
+
+ wrong_insert = "INSERT { <test://nb222645-wrong-class-contact> a nco:IMContact. } "
+ self.assertRaises (dbus.DBusException,
+ self.tracker.update,
+ wrong_insert)
+
+ new_data = self.tracker.query (query)
+ self.assertEquals (len (original_data), len (new_data))
+ # We could be more picky, but checking there are the same number of results
+ # is enough to verify the problem described in the bug.
+
+
+
+
+
if __name__ == "__main__":
ut.main()
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]