[tracker/harmattan-pre-signal-updates: 1251/1380] tests: Adapted tests to nfo:Equipment ontology change



commit 6c68bc2f6640f0eee24ca3fdb2c8b53faa1ff426
Author: Philip Van Hoof <philip codeminded be>
Date:   Tue Sep 7 11:51:46 2010 +0200

    tests: Adapted tests to nfo:Equipment ontology change

 tests/functional-tests/performance-tc-modified.py |   16 ++++++++--------
 tests/tracker-writeback/01-writeback.py           |    2 +-
 utils/data-generators/cc/nmm.py                   |    2 +-
 3 files changed, 10 insertions(+), 10 deletions(-)
---
diff --git a/tests/functional-tests/performance-tc-modified.py b/tests/functional-tests/performance-tc-modified.py
index 94934eb..5bb7980 100644
--- a/tests/functional-tests/performance-tc-modified.py
+++ b/tests/functional-tests/performance-tc-modified.py
@@ -1146,8 +1146,8 @@ class gallery(TestUpdate):
 		"""Querying all images and videos taken with phone's camera """
 
 		query = "SELECT ?media WHERE { \
-                     	?media a nfo:Visual; \
-                        nfo:device 'NOKIA' }"
+                        ?media a nfo:Visual; \
+                        nfo:equipment [ a nfo:Equipment; nfo:make 'NOKIA' ] }"
 
 		list=[]
 		for i in range ( 0, iterations ):
@@ -1349,8 +1349,8 @@ class gallery(TestUpdate):
 		"""Querying 500 images and videos taken with phone's camera """
 
 		query = "SELECT ?media WHERE { \
-                     	?media a nfo:Visual; \
-                        nfo:device 'NOKIA' } LIMIT 500"
+                        ?media a nfo:Visual; \
+                        nfo:equipment [ a nfo:Equipment; nfo:make 'NOKIA' ] } LIMIT 500"
 
 		list=[]
 		for i in range ( 0, iterations ):
@@ -1386,7 +1386,7 @@ class gallery(TestUpdate):
 			nie:mimeType ?mime. \
 			OPTIONAL { ?image nfo:height ?height .}\
 			OPTIONAL { ?image nfo:width  ?width .}\
-			OPTIONAL { ?image nfo:device ?camera .}\
+			OPTIONAL { ?image nfo:equipment [ nfo:model ?camera ] .}\
 			OPTIONAL { ?image nmm:exposureTime ?exposuretime .}\
 			OPTIONAL { ?image nmm:fnumber ?fnumber .}\
 			OPTIONAL { ?image nmm:focalLength ?focallength .}} LIMIT 10000"
@@ -1428,7 +1428,7 @@ class gallery(TestUpdate):
 			nie:mimeType ?mime. \
 			OPTIONAL { ?image nfo:height ?height .}\
 			OPTIONAL { ?image nfo:width  ?width .}\
-			OPTIONAL { ?image nfo:device ?camera .}\
+			OPTIONAL { ?image nfo:equipment [ nfo:model ?camera ] .}\
 			OPTIONAL { ?image nmm:exposureTime ?exposuretime .}\
 			OPTIONAL { ?image nmm:fnumber ?fnumber .}\
 			OPTIONAL { ?image nmm:focalLength ?focallength .}} LIMIT 500"
@@ -1499,7 +1499,7 @@ class gallery(TestUpdate):
 		"""Querying all images """
 		"""simplified version of test_gallery_09 """
 
-		query = "SELECT nie:url(?image) nie:mimeType(?image) nfo:device(?image) nmm:exposureTime(?image) nmm:fnumber(?image) nmm:focalLength(?image) WHERE { ?image a nmm:Photo . } limit 10000"
+		query = "SELECT nie:url(?image) nie:mimeType(?image) nfo:model (nfo:equipment (?image)) nmm:exposureTime(?image) nmm:fnumber(?image) nmm:focalLength(?image) WHERE { ?image a nmm:Photo . } limit 10000"
 
 
 		list=[]
@@ -1530,7 +1530,7 @@ class gallery(TestUpdate):
 		"""Querying 500 images """
 		"""simplified version of test_gallery_10 """
 
-		query = "SELECT nie:url(?image) nie:mimeType(?image) nfo:device(?image) nmm:exposureTime(?image) nmm:fnumber(?image) nmm:focalLength(?image) WHERE { ?image a nmm:Photo . } limit 500"
+		query = "SELECT nie:url(?image) nie:mimeType(?image) nfo:model (nfo:equipment (?image)) nmm:exposureTime(?image) nmm:fnumber(?image) nmm:focalLength(?image) WHERE { ?image a nmm:Photo . } limit 500"
 
 
 		list=[]
diff --git a/tests/tracker-writeback/01-writeback.py b/tests/tracker-writeback/01-writeback.py
index 9a75b37..36713ec 100755
--- a/tests/tracker-writeback/01-writeback.py
+++ b/tests/tracker-writeback/01-writeback.py
@@ -69,7 +69,7 @@ class TestInsertion (unittest.TestCase):
                       nmm:exposureTime '1' ;
                       nmm:isoSpeed '1' ;
                       nmm:fnumber '1' ;
-                      nfo:device 'Some Test Model' ;
+                      nfo:equipment [ a nfo:Equipment ; nfo:model 'Some Test Model' ] ;
                       nco:contributor [ a nco:Contact ;
                                         nco:fullname 'test_fullname_2' ] ;
                       nie:copyright 'test_copyright_1'
diff --git a/utils/data-generators/cc/nmm.py b/utils/data-generators/cc/nmm.py
index 7970e07..76fe250 100644
--- a/utils/data-generators/cc/nmm.py
+++ b/utils/data-generators/cc/nmm.py
@@ -14,7 +14,7 @@ nmm_Photo = '''
     nfo:fileLastAccessed "%(photo_date)s";
     nfo:fileSize         "%(photo_size)s";
     nfo:fileName         "%(photo_filename)s" ;
-    nfo:device           "%(photo_camera)s";
+    nfo:equipment        [a nfo:Equipment ; nfo:model "%(photo_camera)s"];
     nmm:exposureTime     "%(photo_exposure)s";
     nmm:fnumber          "%(photo_fnumber)s";
     nmm:focalLength      "%(photo_focal_length)s";



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