def test_dict_methods(self):
     """Settings dict methods"""
     other = {'key1': 'spoons!'}
     s = Settings(self.settings_file)
     self.assertEqual(s['key1'], DEFAULT_SETTINGS['key1'])
     s.update(other)
     s.setdefault('alist', [])
     s2 = Settings(self.settings_file)
     self.assertEqual(s['key1'], s2['key1'])
     self.assertEqual(s['key1'], 'spoons!')
     self.assertEqual(s2['alist'], [])
 def test_dict_methods(self):
     """Settings dict methods"""
     other = {'key1': 'spoons!'}
     s = Settings(self.settings_file)
     self.assertEqual(s['key1'], DEFAULT_SETTINGS['key1'])
     s.update(other)
     s.setdefault('alist', [])
     s2 = Settings(self.settings_file)
     self.assertEqual(s['key1'], s2['key1'])
     self.assertEqual(s['key1'], 'spoons!')
     self.assertEqual(s2['alist'], [])
Exemplo n.º 3
0
 def test_dict_methods(self):
     """Settings dict methods"""
     other = {"key1": "spoons!"}
     s = Settings(self.settings_file)
     self.assertEqual(s["key1"], DEFAULT_SETTINGS["key1"])
     s.update(other)
     s.setdefault("alist", [])
     s2 = Settings(self.settings_file)
     self.assertEqual(s["key1"], s2["key1"])
     self.assertEqual(s["key1"], "spoons!")
     self.assertEqual(s2["alist"], [])
 def test_dict_methods(self):
     """Settings dict methods"""
     other = {"key1": "spoons!"}
     s = Settings(self.settings_file)
     self.assertEqual(s["key1"], DEFAULT_SETTINGS["key1"])
     s.update(other)
     s.setdefault("alist", [])
     s2 = Settings(self.settings_file)
     self.assertEqual(s["key1"], s2["key1"])
     self.assertEqual(s["key1"], "spoons!")
     self.assertEqual(s2["alist"], [])