mirror of
https://github.com/koloideal/Argenta.git
synced 2026-06-10 10:05:28 +03:00
work on docs, tests and some fix
This commit is contained in:
@@ -24,3 +24,26 @@ class TestFlagsGroup(unittest.TestCase):
|
||||
flags = FlagsGroup()
|
||||
flags.add_flags([Flag('test'), Flag('test2')])
|
||||
self.assertEqual(len(flags.get_flags()), 2)
|
||||
|
||||
def test_unparse_flags_to_dict(self):
|
||||
list_of_flags = [
|
||||
Flag('test1'),
|
||||
Flag('test2'),
|
||||
Flag('test3'),
|
||||
]
|
||||
flags = FlagsGroup(list_of_flags)
|
||||
serialized_flags = flags.unparse_to_dict()
|
||||
needed_result = {'test1': {'name': 'test1',
|
||||
'prefix': '--',
|
||||
'string_entity': '--test1',
|
||||
'value': None},
|
||||
'test2': {'name': 'test2',
|
||||
'prefix': '--',
|
||||
'string_entity': '--test2',
|
||||
'value': None},
|
||||
'test3': {'name': 'test3',
|
||||
'prefix': '--',
|
||||
'string_entity': '--test3',
|
||||
'value': None}}
|
||||
|
||||
self.assertDictEqual(serialized_flags, needed_result)
|
||||
|
||||
Reference in New Issue
Block a user