[tracker/NB217636] Temporary commit and branch
- From: Philip Van Hoof <pvanhoof src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [tracker/NB217636] Temporary commit and branch
- Date: Tue, 18 Jan 2011 13:36:37 +0000 (UTC)
commit 00eeb4893e16ffe9432d17a82f4ea85fb072d3dc
Author: Philip Van Hoof <philip codeminded be>
Date: Tue Jan 18 14:36:15 2011 +0100
Temporary commit and branch
tests/functional-tests/02-sparql-bugs.py | 59 ++++++++++++++++++++++++------
1 files changed, 48 insertions(+), 11 deletions(-)
---
diff --git a/tests/functional-tests/02-sparql-bugs.py b/tests/functional-tests/02-sparql-bugs.py
index fe8f497..c7f3785 100755
--- a/tests/functional-tests/02-sparql-bugs.py
+++ b/tests/functional-tests/02-sparql-bugs.py
@@ -147,46 +147,83 @@ class TrackerStoreSparqlBugsTests (CommonTrackerStoreTest):
}
"""
- @expectedFailureBug ("NB#217636")
+# @expectedFailureBug ("NB#217636")
def test_02_NB217636_delete_statements (self):
"""
Bug 217636 - Not able to delete contact using
DELETE {<contact:556> ?p ?v} WHERE {<contact:556> ?p ?v}.
"""
- data = """ INSERT {
- <contact:test-nb217636> a nco:PersonContact ;
- nco:fullname 'Testing bug 217636'
- }
+ data = """
+
+DELETE {
+ <telepathy:/org/freedesktop/fake/account/556!556 ovi com> a nco:IMAddress,
+nie:InformationElement
+}
+
+INSERT INTO <telepathy:/org/freedesktop/fake/account/556!556 ovi com> {
+ <telepathy:/org/freedesktop/fake/account/556!556 ovi com> a nco:IMAddress,
+nie:InformationElement;
+ nco:imID '556 ovi com';
+ nco:imNickname 'SomeGuy';
+ nco:imPresence nco:presence-status-available;
+ nco:imStatusMessage 'In Helsinki';
+ nco:imCapability nco:im-capability-text-chat,
+nco:im-capability-audio-calls;
+ nco:imAvatar [a nfo:FileDataObject; nie:url
+'file:///home/user/.cache/telepathy/avatars/569a1bb37ec1f7269df3acd0cc981e4c'];
+ nco:presenceLastModified '2011-01-10T06:22:15Z'^^xsd:dateTime.
+ <telepathy:/org/freedesktop/fake/account/556> a nco:IMAccount;
+ nco:imDisplayName 'ovi.com';
+ nco:hasIMContact
+<telepathy:/org/freedesktop/fake/account/556!556 ovi com>.
+}
+
+INSERT INTO <telepathy:/org/freedesktop/fake/account/556!556 ovi com> {
+ <affiliation:/org/freedesktop/fake/account/556!556 ovi com> a
+nco:Affiliation.
+ <affiliation:/org/freedesktop/fake/account/556!556 ovi com>
+nco:hasIMAddress <telepathy:/org/freedesktop/fake/account/556!556 ovi com>.
+ <contact:556> a nco:PersonContact;
+ nco:contactLocalUID '556';
+ nco:hasAffiliation [ a nco:Affiliation ; nco:hasIMAddress
+<telepathy:/org/freedesktop/fake/account/556!556 ovi com> ];
+ nco:nameGiven 'Some';
+ nco:nameFamily 'Guy';
+ nie:generator 'telepathy';
+ nco:hasAffiliation
+<affiliation:/org/freedesktop/fake/account/556!556 ovi com>.
+}
+
"""
self.tracker.update (data)
results = self.tracker.query ("""
SELECT ?u WHERE {
?u a nco:PersonContact ;
- nco:fullname 'Testing bug 217636' .
+ nco:nameGiven 'Some' .
}
""")
self.assertEquals (len (results), 1)
self.assertEquals (len (results[0]), 1)
- self.assertEquals (results[0][0], "contact:test-nb217636")
+ self.assertEquals (results[0][0], "contact:556")
problematic_delete = """
- DELETE { <contact:test-nb217636> ?p ?v }
- WHERE { <contact:test-nb217636> ?p ?v }'
+DELETE {<contact:556> ?p ?v} WHERE {<contact:556> ?p ?v}
"""
+
self.tracker.update (problematic_delete)
results_after = self.tracker.query ("""
SELECT ?u WHERE {
?u a nco:PersonContact ;
- nco:fullname 'Testing bug 217636' .
+ nco:nameGiven 'Some' .
}
""")
self.assertEquals (len (results_after), 0)
# Safe deletion
delete = """
- DELETE { <contact:test-nb217636> a rdfs:Resource. }
+ DELETE { <contact:556> a rdfs:Resource. }
"""
self.tracker.update (delete)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]