aboutsummaryrefslogtreecommitdiff
path: root/test/test_config/test_sections.py
diff options
context:
space:
mode:
Diffstat (limited to 'test/test_config/test_sections.py')
-rw-r--r--test/test_config/test_sections.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/test/test_config/test_sections.py b/test/test_config/test_sections.py
index 2aba3c7..39b41a7 100644
--- a/test/test_config/test_sections.py
+++ b/test/test_config/test_sections.py
@@ -22,6 +22,7 @@ import unittest
22path = os.path.realpath(os.path.join(os.path.dirname(__file__), '..', '..')) 22path = os.path.realpath(os.path.join(os.path.dirname(__file__), '..', '..'))
23sys.path.append(path) 23sys.path.append(path)
24from dodai.tools.himo import Himo 24from dodai.tools.himo import Himo
25from dodai.tools.himo import String2Himo
25from dodai.config.sections import ConfigSections 26from dodai.config.sections import ConfigSections
26 27
27 28
@@ -32,7 +33,7 @@ class TestSections(unittest.TestCase):
32 filepath = os.path.join(path, 'config.cfg') 33 filepath = os.path.join(path, 'config.cfg')
33 self.parser = ConfigParser.ConfigParser() 34 self.parser = ConfigParser.ConfigParser()
34 self.parser.readfp(open(filepath)) 35 self.parser.readfp(open(filepath))
35 self.sections = ConfigSections(Himo) 36 self.sections = ConfigSections(String2Himo())
36 37
37 def test_call(self): 38 def test_call(self):
38 self.sections(self.parser) 39 self.sections(self.parser)
@@ -108,6 +109,9 @@ class TestSections(unittest.TestCase):
108 val = self.sections.test_db['foo'] 109 val = self.sections.test_db['foo']
109 self.assertTrue(val == 'bar') 110 self.assertTrue(val == 'bar')
110 111
112 def test_section_object_seven(self):
113 self.sections(self.parser, 'unicode_escape')
114 self.assertEqual(self.sections.extra.name, u'\u8c61')
111 115
112 116
113if __name__ == '__main__': 117if __name__ == '__main__':