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



commit e17f0700c5f086ae2d9e57c57683b0e0b5689406
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]