mirror of
https://github.com/Cog-Creators/Red-DiscordBot.git
synced 2025-11-20 09:56:05 -05:00
[V3 Config] Implement a true clear method (#1344)
* Add clear methods to drivers * Update config clear methods, add to Value * Add test
This commit is contained in:
@@ -298,6 +298,16 @@ async def test_member_clear_all(config, member_factory):
|
||||
assert len(await config.all_members()) == 0
|
||||
|
||||
|
||||
@pytest.mark.asyncio
|
||||
async def test_clear_value(config_fr):
|
||||
config_fr.register_global(foo=False)
|
||||
await config_fr.foo.set(True)
|
||||
await config_fr.foo.clear()
|
||||
|
||||
with pytest.raises(KeyError):
|
||||
await config_fr.get_raw('foo')
|
||||
|
||||
|
||||
# Get All testing
|
||||
@pytest.mark.asyncio
|
||||
async def test_user_get_all_from_kind(config, user_factory):
|
||||
|
||||
Reference in New Issue
Block a user