summaryrefslogtreecommitdiff
path: root/tests/functional-tests/400-extractor.py
diff options
context:
space:
mode:
authorSam Thursfield <sam@afuera.me.uk>2016-07-07 00:59:15 +0100
committerSam Thursfield <sam@afuera.me.uk>2016-07-07 00:59:15 +0100
commit661f2e377309b523f7406ae86d8f21b378f886a7 (patch)
tree09aafde0d7e64c5a8b8711c9ec24cee83e6e08a7 /tests/functional-tests/400-extractor.py
parenteb8873a67090adc57202b4b74c693fe31c9252aa (diff)
downloadtracker-wip/sam/resource-jsonld.tar.gz
WORK IN PROGRESS converting 400 extractor testswip/sam/resource-jsonld
Ignore this commit (or finish it off for me ... :-)
Diffstat (limited to 'tests/functional-tests/400-extractor.py')
-rwxr-xr-xtests/functional-tests/400-extractor.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/tests/functional-tests/400-extractor.py b/tests/functional-tests/400-extractor.py
index 140b5d527..4fd3b8b5e 100755
--- a/tests/functional-tests/400-extractor.py
+++ b/tests/functional-tests/400-extractor.py
@@ -1,6 +1,7 @@
#!/usr/bin/python
#
# Copyright (C) 2010, Nokia <ivan.frade@nokia.com>
+# Copyright (C) 2016, Sam Thursfield <sam@afuera.me.uk>
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
@@ -24,7 +25,7 @@ directory (containing xxx.expected files)
"""
from common.utils import configuration as cfg
-from common.utils.extractor import get_tracker_extract_output
+from common.utils.extractor import get_tracker_extract_jsonld_output
import unittest2 as ut
import os
import sys
@@ -112,7 +113,7 @@ class ExtractionTestCase (ut.TestCase):
filename_to_extract = self.configParser.get ("TestFile", "Filename")
self.file_to_extract = os.path.join (desc_root, filename_to_extract)
- result = get_tracker_extract_output(self.file_to_extract)
+ result = get_tracker_extract_jsonld_output(self.file_to_extract)
self.__assert_extraction_ok (result)
def assertDictHasKey (self, d, key, msg=None):
@@ -156,6 +157,8 @@ class ExtractionTestCase (ut.TestCase):
unexpected_pairs.append ( (k[1:].replace ("_", ":"), v) )
elif k.startswith ("@"):
expected_keys.append ( k[1:].replace ("_", ":") )
+ elif k == 'a':
+ expected_keys.append ( '@type' )
else:
expected_pairs.append ( (k.replace ("_", ":"), v) )