We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 05be8bd commit 9a2aeb1Copy full SHA for 9a2aeb1
1 file changed
tests/airos/test_intermediate.py
@@ -0,0 +1,20 @@
1
+import unittest
2
+
3
+from netjsonconfig.backends.airos.airos import intermediate_to_list
4
5
6
+class TestIntermediateConversion(unittest.TestCase):
7
8
+ def test_dict_conversion(self):
9
+ i = [{'spam': {'eggs': 'spam and eggs'}}]
10
11
+ o = [{'spam.eggs': 'spam and eggs'}]
12
13
+ self.assertEqual(intermediate_to_list(i), o)
14
15
+ def test_list_conversion(self):
16
+ i = [{'kings': [{'henry': 'the first'}, {'jacob': 'the second'}]}]
17
18
+ o = [{'kings.1.henry': 'the first', 'kings.2.jacob': 'the second'}]
19
20
0 commit comments