aboutsummaryrefslogtreecommitdiffstats
path: root/tests/cogs/test_antispam.py
diff options
context:
space:
mode:
authorGravatar Sebastiaan Zeeff <[email protected]>2019-10-25 15:24:33 +0200
committerGravatar GitHub <[email protected]>2019-10-25 15:24:33 +0200
commitccbc6a6c218056629af0210f101468fa39bc312e (patch)
tree5ade16d0cf00c2cc876c511f73b12237bc31f603 /tests/cogs/test_antispam.py
parentSubstract one to now calculation (diff)
parentMerge pull request #543 from atmishra/moderator-channel-check (diff)
Merge branch 'master' into reminder-up
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