[tracker/rss-enclosures] functional-tests: Fixed metadata query for images



commit 25a7bf0e2af52b9625a285eb71bee6fe14db1e07
Author: Amit Jain <ext-amit 1 jain nokia com>
Date:   Thu Apr 29 11:23:46 2010 +0100

    functional-tests: Fixed metadata query for images

 tests/functional-tests/metadata_extraction_tc.py |    9 ++++++---
 1 files changed, 6 insertions(+), 3 deletions(-)
---
diff --git a/tests/functional-tests/metadata_extraction_tc.py b/tests/functional-tests/metadata_extraction_tc.py
index 00664c9..0d38785 100755
--- a/tests/functional-tests/metadata_extraction_tc.py
+++ b/tests/functional-tests/metadata_extraction_tc.py
@@ -514,7 +514,8 @@ class images(TrackerHelpers):
 					results = self.query (query)
 					print results
 					print  'Expected = ' + expRes.strip()
-					if len(results) > 0 and expRes.strip() == results[0][0]:
+					exp_val = (expRes.strip()).split(' mm')
+					if len(results) > 0 and exp_val[0] == results[0][0]:
 						print  'Actual = ' + results[0][0]
 					else:
 						Results[testFile]=parm
@@ -543,8 +544,10 @@ class images(TrackerHelpers):
 				print parm
                                 if parm.rstrip() == 'Keyword':
 					query = "SELECT ?value WHERE { \
-					?uid nie:url <%s>; \
-					nie:keyword ?value.}" %(file_uri)
+					?i a nfo:Image .\
+					?i nie:url <%s>.\
+					?i nao:hasTag ?tag.\
+					?tag nao:prefLabel ?value.}" %(file_uri)
 					print query
 					results = self.query (query)
 					print results



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