From a407ad4f7cfd9b8922ac73dbe60a58aace2f3957 Mon Sep 17 00:00:00 2001 From: mgrani Date: Fri, 2 May 2025 09:17:08 +0200 Subject: [PATCH] fix: query test fix --- Readme.md | 4 +++- tests/repository/functional_test.py | 4 ++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/Readme.md b/Readme.md index 584f8f4..1fb8c2f 100644 --- a/Readme.md +++ b/Readme.md @@ -511,7 +511,9 @@ Commit messages are used according to the [Angular git Log message conventions]( ## Roadmap - [ ] Add more tests -- [ ] Update repository statistics and allow tag based specifiers for query federation +- [X] Update repository statistics on download / bandwith +- [ ] add query federation support +- [ ] allow tag based specifiers for query federation - [ ] Add web-graph support. - [ ] overall clean-up and restructuring - [ ] Dataset cleaning diff --git a/tests/repository/functional_test.py b/tests/repository/functional_test.py index e617e4c..d13c050 100644 --- a/tests/repository/functional_test.py +++ b/tests/repository/functional_test.py @@ -104,14 +104,14 @@ class OriginalConfigTests(unittest.TestCase): self.assertTrue(_local.metadata.get(a) is not None, f"Attribute {a} does not exist in local dataset") self.assertTrue(_remote.metadata.get(a) is not None, f"Attribute {a} does not exist in remtoe dataset") self.assertTrue(_remote.metadata.get(a) ==_local.metadata.get(a), - f"Attribute {a}have different values in local / remote: {_local.metadata.get(a)}!={_remote.metadata.get(a)}") + f"Attribute {a} have different values in local / remote: {_local.metadata.get(a)}!={_remote.metadata.get(a)}") _q = QueryCommands(self.ctx['OWI'], **self.ctx).do("less", "all/id=a962a1bb-3a65-4c24-954c-a96c99d5e95e", None, select="url,title", where="WHERE LOWER(url) like '%impressum%' OR LOWER(url) like '%legal%' OR LOWER(url) like '%imprint%' OR LOWER(url) like '%terms%' OR LOWER(url) like '%privacy%' OR LOWER(url) like '%contact%' OR LOWER(url) like '%agreement%' OR LOWER(title) like '%impressum%' OR LOWER(title) like '%imprint%'", limit=10, pq_batch_size=1, as_json=True) - self.assertTrue(_q.success, "query not successufll"+str(_q)) + self.assertTrue(_q[0]["success"], "query not successufll"+str(_q)) _q = QueryCommands(self.ctx['OWI'], **self.ctx).do("less", "all/id=a962a1bb-3a65-4c24-954c-a96c99d5e95e", None, select="url,title", -- 2.51.2