mirror of
https://github.com/koloideal/Argenta.git
synced 2026-06-10 10:05:28 +03:00
release v1.0.0a1
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
from argenta.command.models import InputCommand
|
||||
from argenta.command.flag import Flag, InputFlag, Flags
|
||||
from argenta.command.models import InputCommand, Command
|
||||
from argenta.command.exceptions import (UnprocessedInputFlagException,
|
||||
RepeatedInputFlagsException,
|
||||
EmptyInputCommandException)
|
||||
@@ -22,3 +23,11 @@ class TestInputCommand(unittest.TestCase):
|
||||
with self.assertRaises(EmptyInputCommandException):
|
||||
InputCommand.parse('')
|
||||
|
||||
def test_validate_correct_input_flag1(self):
|
||||
command = Command('some', flags=Flag('test'))
|
||||
self.assertEqual(command.validate_input_flag(InputFlag('test')), True)
|
||||
|
||||
def test_validate_correct_input_flag2(self):
|
||||
command = Command('some', flags=Flags(Flag('test'), Flag('more')))
|
||||
self.assertEqual(command.validate_input_flag(InputFlag('more')), True)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user