Skip to content

Commit

Permalink
added unit test for config.py
Browse files Browse the repository at this point in the history
  • Loading branch information
fpgmaas committed Dec 22, 2022
1 parent 3e8a9f8 commit 7b35241
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions tests/config/test_config.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
from ckit.command import Command
from ckit.command_group import CommandGroup
from ckit.config.config import Config


def test_config():
commandgroup1 = CommandGroup(commands={"echo": Command(name="echo", cmd="echo Hello world!")})
commandgroup2 = CommandGroup(commands={"echo2": Command(name="echo2", cmd="echo Hello world!")})
config = Config(local_command_groups={"group1": commandgroup1}, global_command_groups={"group2": commandgroup2})
assert config.get_command_group_names() == {"local": ["group1"], "global": ["group2"]}

0 comments on commit 7b35241

Please sign in to comment.