def test_load_config(self):
"""
Test loading of the config attribute
"""
usrmgr = self.__get_dummy_object()
with patch("os.path.exists", return_value=True),\
patch("ownbot.usermanager.open") as open_mock:
open_mock.return_value = io.BytesIO(b"""
foogroup:
unverified:
- '@foouser'""")
expected_config = {"foogroup": {"unverified": ["@foouser"]}}
self.assertEqual(usrmgr.config, expected_config)
self.assertTrue(open_mock.called)
评论列表
文章目录