This commit is contained in:
2025-03-06 01:35:18 +03:00
parent a57ce490c1
commit b61c151e1c
5 changed files with 21 additions and 5 deletions
+8 -1
View File
@@ -1,7 +1,7 @@
from argenta.command.params.flag import FlagsGroup, Flag
from argenta.router import Router
from argenta.command import Command
from argenta.router.exceptions import RepeatedCommandException
from argenta.router.exceptions import RepeatedCommandException, TriggerCannotContainSpacesException
import unittest
@@ -109,6 +109,13 @@ class TestRouter(unittest.TestCase):
def test():
return 'correct result'
def test_register_command_with_spaces_in_trigger(self):
router = Router()
with self.assertRaises(TriggerCannotContainSpacesException):
@router.command(Command(trigger='command with spaces'))
def test():
return 'correct result'