diff options
Diffstat (limited to 'test/extractor/image')
-rw-r--r-- | test/extractor/image/test_colors_spatial.py | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/test/extractor/image/test_colors_spatial.py b/test/extractor/image/test_colors_spatial.py index 967aaf2..902ab6d 100644 --- a/test/extractor/image/test_colors_spatial.py +++ b/test/extractor/image/test_colors_spatial.py @@ -19,8 +19,8 @@ from bsie.extractor.image.colors_spatial import ColorsSpatial class TestColorsSpatial(unittest.TestCase): def setUp(self): # content id with default constructors (width=32, height=32, exp=4) - self.instance_prefix = 'http://ie.bsfs.ai/schema/Feature/ColorsSpatial' - self.predicate_prefix = 'http://bsfs.ai/schema/Entity/colors_spatial' + self.instance_prefix = 'https://schema.bsfs.io/ie/Literal/Array/Feature/ColorsSpatial' + self.predicate_prefix = 'https://schema.bsfs.io/ie/Node/Entity#colors_spatial_' self.uuid = 'adee8d6c43687021e1c5bffe56bcfe727f1638d792744137181304ef889dac2a' def test_essentials(self): @@ -50,7 +50,7 @@ class TestColorsSpatial(unittest.TestCase): def test_schema(self): schema = bsfs.schema.from_string(base.SCHEMA_PREAMBLE + f''' - <{self.instance_prefix}> rdfs:subClassOf bsfs:Feature ; + <{self.instance_prefix}> rdfs:subClassOf bsa:Feature ; # annotations rdfs:label "Spatially dominant colors"^^xsd:string ; schema:description "Domiant colors of subregions in an image."^^xsd:string ; @@ -63,8 +63,8 @@ class TestColorsSpatial(unittest.TestCase): <{self.instance_prefix}/args#height> "32"^^xsd:integer ; <{self.instance_prefix}/args#exp> "4"^^xsd:float . - <{self.predicate_prefix}#{self.uuid}> rdfs:subClassOf bsfs:Predicate ; - rdfs:domain bsfs:File ; + <{self.predicate_prefix}{self.uuid}> rdfs:subClassOf bsfs:Predicate ; + rdfs:domain bsn:Entity ; rdfs:range <{self.instance_prefix}#{self.uuid}> ; bsfs:unique "true"^^xsd:boolean . ''') @@ -73,7 +73,7 @@ class TestColorsSpatial(unittest.TestCase): def test_extract(self): ext = ColorsSpatial(2,2,2) img = PIL.Image.open(os.path.join(os.path.dirname(__file__), 'testimage.jpg')) - node = _node.Node(ns.bsfs.Entity, bsfs.URI('http://example.com/entity#1234')) + node = _node.Node(ns.bsn.Entity, bsfs.URI('http://example.com/entity#1234')) principals = set(ext.principals) self.assertEqual(len(principals), 1) # valid invocation yields feature |