From 210fbc4126441c45c224db7fc424658638149481 Mon Sep 17 00:00:00 2001
From: Daniel <d.hornung@indiscale.com>
Date: Wed, 24 Apr 2024 10:02:04 +0200
Subject: [PATCH] TEST: Added unit test.

Also added link to issue in changelog.
---
 CHANGELOG.md                      |  2 +-
 unittests/test_table_converter.py | 12 ++++++++++++
 2 files changed, 13 insertions(+), 1 deletion(-)

diff --git a/CHANGELOG.md b/CHANGELOG.md
index 889e81a9..2dbc1ee2 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -27,7 +27,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
 ### Fixed ###
 
 - Json schema exporter handles reference properties better.
-- `to_table` failed on lists as values.
+- [#59](https://gitlab.com/linkahead/linkahead-advanced-user-tools/-/issues/59) `to_table` failed on lists as values.
 
 ### Security ###
 
diff --git a/unittests/test_table_converter.py b/unittests/test_table_converter.py
index dbf593de..6a3b0dda 100644
--- a/unittests/test_table_converter.py
+++ b/unittests/test_table_converter.py
@@ -65,6 +65,18 @@ class TableTest(unittest.TestCase):
         c.extend([r1, r2])
         self.assertRaises(ValueError, to_table, c)
 
+    def test_list(self):
+        r1 = db.Record()
+        r1.add_parent("no1")
+        r1.add_property("p1")
+        r2 = db.Record()
+        r2.add_parent("no1")
+        r2.add_property("p1")
+        r2.add_property("p2", value=[1, 2])
+        c = db.Container()
+        c.extend([r1, r2])
+        to_table(c)
+
 
 class FromTsvTest(unittest.TestCase):
     def test_basic(self):
-- 
GitLab