aboutsummaryrefslogtreecommitdiffstats
path: root/tests/cogs/test_antispam.py
diff options
context:
space:
mode:
authorGravatar mathsman5133 <[email protected]>2020-02-10 21:37:43 +1100
committerGravatar mathsman5133 <[email protected]>2020-02-10 21:37:43 +1100
commitf34139a2811a3a05f68c1a18afb345c914da35f3 (patch)
treea8ae0af8510f5dc5bc0b4878ba73d4e34920d08d /tests/cogs/test_antispam.py
parentRemove trailing comma (diff)
parentMerge pull request #625 from python-discord/emoji-cleanup (diff)
Merge branch 'master' of https://github.com/python-discord/bot into help-refactor
 Conflicts:  bot/cogs/help.py
Diffstat (limited to 'tests/cogs/test_antispam.py')
-rw-r--r--tests/cogs/test_antispam.py30
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