[tracker/wip/carlosg/fixes-for-dataobject-split: 8/8] trackertestutils: Prepare for DataObject/InformationElement split



commit 19b175eceb68092f88bac7fdb326ee88870cff4d
Author: Carlos Garnacho <carlosg gnome org>
Date:   Thu Apr 23 12:32:40 2020 +0200

    trackertestutils: Prepare for DataObject/InformationElement split
    
    Check things through nie:isStoredAs, even though it currently points
    to self in most situations.

 utils/trackertestutils/helpers.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/utils/trackertestutils/helpers.py b/utils/trackertestutils/helpers.py
index 256ec1144..08df8b470 100644
--- a/utils/trackertestutils/helpers.py
+++ b/utils/trackertestutils/helpers.py
@@ -205,7 +205,7 @@ class await_update():
         log.info("Awaiting update of resource id %s", self.resource_id)
 
         query_before = ' '.join([
-            'SELECT ?urn tracker:id(?urn) '
+            'SELECT nie:isStoredAs(?urn) ?urn tracker:id(?urn) '
             ' WHERE { '
             '   ?urn a rdfs:Resource ; ',
             self.before_predicates,
@@ -428,7 +428,7 @@ class StoreHelper():
         Get the internal ID for a given resource, identified by URL.
         """
         result = self.query(
-            'SELECT tracker:id(?r) WHERE { ?r nie:url "%s" }' % url)
+            'SELECT tracker:id(?r) WHERE { ?r nie:isStoredAs/nie:url "%s" }' % url)
         if len(result) == 1:
             return int(result[0][0])
         elif len(result) == 0:


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]