[tracker-miners/wip/carlosg/test-fixes: 2/5] functional-tests: Ensure we have the right rdf:type in the right graph
- From: Carlos Garnacho <carlosg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [tracker-miners/wip/carlosg/test-fixes: 2/5] functional-tests: Ensure we have the right rdf:type in the right graph
- Date: Sat, 7 Dec 2019 15:46:19 +0000 (UTC)
commit 3cb01c9292f672f736739708eadabce1cbc9d5d3
Author: Carlos Garnacho <carlosg gnome org>
Date: Sat Nov 30 11:35:21 2019 +0100
functional-tests: Ensure we have the right rdf:type in the right graph
Some queries are done on specific graphs where the given resource does not
have the right rdf:type to allow setting a property. Ensure those rdf:types
are set in those graphs, so the properties can be set.
tests/functional-tests/500-writeback-images.py | 4 ++--
tests/functional-tests/501-writeback-image-details.py | 2 +-
tests/functional-tests/502-writeback-audio.py | 4 ++--
3 files changed, 5 insertions(+), 5 deletions(-)
---
diff --git a/tests/functional-tests/500-writeback-images.py b/tests/functional-tests/500-writeback-images.py
index 8a4d71c04..46462f55a 100755
--- a/tests/functional-tests/500-writeback-images.py
+++ b/tests/functional-tests/500-writeback-images.py
@@ -57,7 +57,7 @@ class WritebackImagesTest (CommonTrackerWritebackTest):
TEST_VALUE = prop.replace(":", "") + "test"
SPARQL_TMPL = """
DELETE { ?u %s ?v } WHERE { ?u nie:url '%s' ; %s ?v }
- INSERT { ?u %s '%s' }
+ INSERT { ?u a nie:InformationElement; %s '%s' }
WHERE { ?u nie:url '%s' }
"""
self.tracker.update(SPARQL_TMPL % (prop, path.as_uri(), prop, prop, TEST_VALUE, path.as_uri()))
@@ -77,7 +77,7 @@ class WritebackImagesTest (CommonTrackerWritebackTest):
<test://writeback-hasTag-test/1> a nao:Tag ;
nao:prefLabel "testTag" .
- ?u nao:hasTag <test://writeback-hasTag-test/1> .
+ ?u a rdfs:Resource; nao:hasTag <test://writeback-hasTag-test/1> .
} WHERE {
?u nie:url '%s' .
}
diff --git a/tests/functional-tests/501-writeback-image-details.py
b/tests/functional-tests/501-writeback-image-details.py
index 7bcb63d47..f3b53c432 100755
--- a/tests/functional-tests/501-writeback-image-details.py
+++ b/tests/functional-tests/501-writeback-image-details.py
@@ -77,7 +77,7 @@ class WritebackKeepDateTest (CommonTrackerWritebackTest):
# This triggers the writeback
mark_as_favorite = """
INSERT {
- ?u nao:hasTag nao:predefined-tag-favorite .
+ ?u a rdfs:Resource ; nao:hasTag nao:predefined-tag-favorite .
} WHERE {
?u nie:url <%s> .
}
diff --git a/tests/functional-tests/502-writeback-audio.py b/tests/functional-tests/502-writeback-audio.py
index 9c2e8f09f..11e75cbf4 100755
--- a/tests/functional-tests/502-writeback-audio.py
+++ b/tests/functional-tests/502-writeback-audio.py
@@ -31,8 +31,8 @@ class WritebackAudioTest(CommonTrackerWritebackTest):
TEST_VALUE = prop.replace(":", "") + "test"
SPARQL_TMPL = """
- DELETE { ?u %s ?v } WHERE { ?u nie:url '%s' ; %s ?v }
- INSERT { ?u %s '%s' }
+ DELETE { ?u a nie:InformationElement; %s ?v } WHERE { ?u nie:url '%s' ; %s ?v }
+ INSERT { ?u a nie:InformationElement; %s '%s' }
WHERE { ?u nie:url '%s' }
"""
self.tracker.update(SPARQL_TMPL % (prop, path.as_uri(), prop, prop, TEST_VALUE, path.as_uri()))
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]