From 3ffaff08bcb9937f798bee87c597c0f4d3bfaff2 Mon Sep 17 00:00:00 2001
From: Bryan Brancotte <bryan.brancotte@pasteur.fr>
Date: Fri, 13 Jan 2023 12:45:16 +0100
Subject: [PATCH] work with string, in cache to casting to str all var

---
 autocomplete_multi_models/utils.py | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/autocomplete_multi_models/utils.py b/autocomplete_multi_models/utils.py
index 6aaaec9..0e826a0 100644
--- a/autocomplete_multi_models/utils.py
+++ b/autocomplete_multi_models/utils.py
@@ -51,10 +51,12 @@ def init_from_settings():
         get_fcn = import_string(get_set_names[0])
         set_fcn = import_string(get_set_names[1])
 
-        set_fcn("autocomplete_multi_models_test_settings", 1)
-        assert get_fcn("autocomplete_multi_models_test_settings", 3) == 1
-        set_fcn("autocomplete_multi_models_test_settings", 2)
-        assert get_fcn("autocomplete_multi_models_test_settings", 3) == 2
+        set_fcn("autocomplete_multi_models_test_settings", "1")
+        assert get_fcn("autocomplete_multi_models_test_settings", "3") == "1"
+        set_fcn("autocomplete_multi_models_test_settings", "2")
+        assert get_fcn("autocomplete_multi_models_test_settings", "3") == "2"
+
+        set_fcn("autocomplete_multi_models_test_settings", None)  # cleanup
 
         business_process.get_setting_from_storage = get_fcn
         business_process.set_setting_in_storage = set_fcn
-- 
GitLab