(self)
| 57 | assert 'c' in wechaty_setting |
| 58 | |
| 59 | def test_sub_setting(self): |
| 60 | setting_file = os.path.join(self.tempdir.name, "sub", 'simple_setting.json') |
| 61 | wechaty_setting: WechatySetting = WechatySetting(setting_file) |
| 62 | |
| 63 | assert os.path.exists(setting_file) |
| 64 | |
| 65 | wechaty_setting['a'] = 'a' |
| 66 | assert 'a' in wechaty_setting.read_setting() |
| 67 | assert wechaty_setting.read_setting()['a'] == 'a' |
| 68 | |
| 69 | assert 'b' not in wechaty_setting |
| 70 | |
| 71 | assert wechaty_setting.get("b", "b") == "b" |
| 72 | |
| 73 | wechaty_setting.save_setting({"c": "c"}) |
| 74 | assert 'a' not in wechaty_setting |
| 75 | assert 'c' in wechaty_setting |
| 76 | |
| 77 | |
| 78 | async def test_finder(self): |
nothing calls this directly
no test coverage detected