diff options
author | 2019-10-25 10:12:23 -0700 | |
---|---|---|
committer | 2019-10-25 10:12:23 -0700 | |
commit | e68e9ef9cc6d6670a1c6b6a712fe87be1f33d60b (patch) | |
tree | cccbc64ce0b9056efb7b2c07cbec9826d77400ff /tests/cogs/test_antispam.py | |
parent | Remove bold tag when no channel is available (diff) | |
parent | Merge pull request #501 from mathsman5133/reddit-makeover (diff) |
Merge branch 'master' into compact_free
Diffstat (limited to 'tests/cogs/test_antispam.py')
-rw-r--r-- | tests/cogs/test_antispam.py | 30 |
1 files changed, 0 insertions, 30 deletions
diff --git a/tests/cogs/test_antispam.py b/tests/cogs/test_antispam.py deleted file mode 100644 index 67900b275..000000000 --- a/tests/cogs/test_antispam.py +++ /dev/null @@ -1,30 +0,0 @@ -import pytest - -from bot.cogs import antispam - - -def test_default_antispam_config_is_valid(): - validation_errors = antispam.validate_config() - assert not validation_errors - - - ('config', 'expected'), - ( - ( - {'invalid-rule': {}}, - {'invalid-rule': "`invalid-rule` is not recognized as an antispam rule."} - ), - ( - {'burst': {'interval': 10}}, - {'burst': "Key `max` is required but not set for rule `burst`"} - ), - ( - {'burst': {'max': 10}}, - {'burst': "Key `interval` is required but not set for rule `burst`"} - ) - ) -) -def test_invalid_antispam_config_returns_validation_errors(config, expected): - validation_errors = antispam.validate_config(config) - assert validation_errors == expected |