diff options
author | Matthias Baumgartner <dev@igsor.net> | 2023-01-16 21:37:09 +0100 |
---|---|---|
committer | Matthias Baumgartner <dev@igsor.net> | 2023-01-16 21:37:09 +0100 |
commit | 05a841215c82ef40d4679dfc4d2c26572bd4d349 (patch) | |
tree | 9888ae0bd2345816d1ab479dd34b4c6b902c158a /test/apps/test_info.py | |
parent | 057e09d6537bf5c39815661a75819081e3e5fda7 (diff) | |
parent | 58aaa864f9747d27c065739256d4c6635ca9b751 (diff) | |
download | bsie-05a841215c82ef40d4679dfc4d2c26572bd4d349.tar.gz bsie-05a841215c82ef40d4679dfc4d2c26572bd4d349.tar.bz2 bsie-05a841215c82ef40d4679dfc4d2c26572bd4d349.zip |
Merge branch 'mb/feature' into develop
Diffstat (limited to 'test/apps/test_info.py')
-rw-r--r-- | test/apps/test_info.py | 21 |
1 files changed, 20 insertions, 1 deletions
diff --git a/test/apps/test_info.py b/test/apps/test_info.py index 6f4d98f..60e9ba1 100644 --- a/test/apps/test_info.py +++ b/test/apps/test_info.py @@ -4,12 +4,15 @@ Part of the bsie test suite. A copy of the license is provided with the project. Author: Matthias Baumgartner, 2022 """ -# imports +# standard imports import argparse import contextlib import io import unittest +# bsie imports +from bsie.utils import bsfs + # objects to test from bsie.apps.info import main @@ -28,6 +31,22 @@ class TestIndex(unittest.TestCase): 'http://bsfs.ai/schema/Predicate', 'http://bsfs.ai/schema/Entity#filename', 'http://bsfs.ai/schema/Entity#filesize', + 'http://bsfs.ai/schema/Entity/colors_spatial#0658f2234a054e1dd59a14462c89f7733e019160419c796356aa831498bd0a04' + }) + + def test_schema(self): + outbuf = io.StringIO() + with contextlib.redirect_stdout(outbuf): + # show schema infos + main(['schema']) + # verify output + schema = bsfs.schema.from_string(outbuf.getvalue()) + self.assertSetEqual({pred.uri for pred in schema.predicates()}, { + 'http://bsfs.ai/schema/Entity#author', + 'http://bsfs.ai/schema/Predicate', + 'http://bsfs.ai/schema/Entity#filename', + 'http://bsfs.ai/schema/Entity#filesize', + 'http://bsfs.ai/schema/Entity/colors_spatial#0658f2234a054e1dd59a14462c89f7733e019160419c796356aa831498bd0a04' }) def test_invalid(self): |