[tracker-miners/sam/test-runner-fix: 12/24] functional-tests: Fix 501-writeback-details test



commit 0c9a81caf07b60453eec87d4dd5fd098c810b6c9
Author: Sam Thursfield <sam afuera me uk>
Date:   Sun Nov 18 20:12:40 2018 +0100

    functional-tests: Fix 501-writeback-details test
    
    This now passes when running against tracker core commit aa2c2dace5e2dad7

 tests/functional-tests/501-writeback-details.py | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)
---
diff --git a/tests/functional-tests/501-writeback-details.py b/tests/functional-tests/501-writeback-details.py
index fa87caa12..f144da35d 100755
--- a/tests/functional-tests/501-writeback-details.py
+++ b/tests/functional-tests/501-writeback-details.py
@@ -86,9 +86,12 @@ class WritebackKeepDateTest (CommonTrackerWritebackTest):
 
         # Check the value is written in the file
         metadata = get_tracker_extract_jsonld_output (filename, "")
-        self.assertIn (self.favorite, metadata ["nao:hasTag"],
+
+        tags = metadata.get('nao:hasTag', [])
+        tag_names = [tag['nao:prefLabel'] for tag in tags]
+        self.assertIn (self.favorite, tag_names,
                        "Tag hasn't been written in the file")
-        
+
         # Now check the modification date of the files and it should be the same :)
         new_results = self.tracker.query (query_images)
         ## for (uri, date) in new_results:


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