aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--api/tests/test_validators.py13
1 files changed, 12 insertions, 1 deletions
diff --git a/api/tests/test_validators.py b/api/tests/test_validators.py
index 0f3f7fa9..d2c0a136 100644
--- a/api/tests/test_validators.py
+++ b/api/tests/test_validators.py
@@ -1,7 +1,10 @@
from django.core.exceptions import ValidationError
from django.test import TestCase
-from ..validators import validate_tag_embed
+from ..validators import (
+ validate_bot_setting_name,
+ validate_tag_embed
+)
REQUIRED_KEYS = (
@@ -9,6 +12,14 @@ REQUIRED_KEYS = (
)
+class BotSettingValidatorTests(TestCase):
+ def test_accepts_valid_names(self):
+ validate_bot_setting_name('defcon')
+
+ def test_rejects_bad_names(self):
+ with self.assertRaises(ValidationError):
+ validate_bot_setting_name('bad name')
+
class TagEmbedValidatorTests(TestCase):
def test_rejects_non_mapping(self):
with self.assertRaises(ValidationError):