From 74f3282d0a1be5b5c53706153ff1672f5dedc24e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Henrik=20tom=20W=C3=B6rden?= <h.tomwoerden@indiscale.com> Date: Tue, 17 Jan 2023 11:39:43 +0100 Subject: [PATCH] FIX: Remove strip --- src/caoscrawler/identifiable_adapters.py | 2 +- unittests/test_identifiable_adapters.py | 2 -- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/src/caoscrawler/identifiable_adapters.py b/src/caoscrawler/identifiable_adapters.py index 7a27dfeb..da8ebaf2 100644 --- a/src/caoscrawler/identifiable_adapters.py +++ b/src/caoscrawler/identifiable_adapters.py @@ -60,7 +60,7 @@ def convert_value(value): # replace single quotes, otherwise they may break the queries return value.replace("\'", "\\'") else: - return str(value).strip() + return str(value) class IdentifiableAdapter(metaclass=ABCMeta): diff --git a/unittests/test_identifiable_adapters.py b/unittests/test_identifiable_adapters.py index c9c9e86a..06ea8cdf 100644 --- a/unittests/test_identifiable_adapters.py +++ b/unittests/test_identifiable_adapters.py @@ -74,8 +74,6 @@ def test_create_query_for_identifiable(): # With single quote in string query = IdentifiableAdapter.create_query_for_identifiable( Identifiable(record_type="Person", backrefs=[], properties={'last_name': "B'Or"})) - print("find record person which is referenced by 14433 and which is " - "referenced by 333 and with 'last_name'='B\\'Or' ") assert query == ("FIND RECORD Person WITH 'last_name'='B\\'Or' ") -- GitLab