From b05a9b30e75bdea57258671a10f455cb03bcef10 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Piotr=20Ma=C5=9Blanka?= <piotr.maslanka@ericsson.com>
Date: Wed, 3 Apr 2024 15:06:42 +0200
Subject: [PATCH] add extra unit tests for apply_dict_object

---
 tests/test_coding/test_structures.py | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/tests/test_coding/test_structures.py b/tests/test_coding/test_structures.py
index 10177834..181c598e 100644
--- a/tests/test_coding/test_structures.py
+++ b/tests/test_coding/test_structures.py
@@ -866,6 +866,15 @@ class TestStructures(unittest.TestCase):
 
 class TestDictObject(unittest.TestCase):
 
+    def test_constructor2(self):
+        a = {'a': 4, 'b': {'c': 1, 'd': 2}}
+        a = apply_dict_object(a)
+        self.assertEqual(a.a, 4)
+        self.assertEqual(a.b.c, 1)
+        self.assertEqual(a.b.d, 2)
+        self.assertEqual(a['a'], 4)
+        self.assertEqual(a['b'], {'c': 1, 'd': 2})
+
     def test_constructor(self):
         a = DictObject({'a': 5})
         b = apply_dict_object(a)
-- 
GitLab