From 3bee49a233467c08660e4afc9be3f7e836b37f54 Mon Sep 17 00:00:00 2001
From: Daniel <d.hornung@indiscale.com>
Date: Mon, 4 Mar 2024 10:31:58 +0100
Subject: [PATCH] TEST: Multipart encoding problems
 linkahead/linkahead-pylib#115

---
 tests/test_issues_pylib.py | 14 ++++++++++++++
 1 file changed, 14 insertions(+)

diff --git a/tests/test_issues_pylib.py b/tests/test_issues_pylib.py
index 56009a8..d9e873a 100644
--- a/tests/test_issues_pylib.py
+++ b/tests/test_issues_pylib.py
@@ -90,3 +90,17 @@ def test_gitlab_com_108():
     tests = db.execute_query("FIND ENTITY test*", cache=False)
     tests.delete()
     print("deleted")
+
+
+@pytest.mark.xfail(reason="Multipart encoding problem: "
+                   "https://gitlab.com/linkahead/linkahead-pylib/-/issues/115")
+def test_gitlab_com_115():
+    """Mix of files and non-ascii entities may lead to unexpected server error.
+
+    See https://gitlab.com/linkahead/linkahead-pylib/-/issues/115
+    """
+    file1 = db.File(file="/dev/null", path="/1").add_parent("Äh")
+    file2 = db.File(file="/dev/null", path="/2").add_parent("Äh")
+    rec1 = db.Record().add_parent("Äh").add_property(name="Äh").add_property("Oops. Ö")
+    cont = db.Container().extend([file1, file2, rec1]).insert(unique=False)
+    assert len(cont) == 4
-- 
GitLab