mirror of
https://github.com/kellyjonbrazil/jc.git
synced 2025-06-17 00:07:37 +02:00
Create basic tests for generate_magic_commands()
This commit is contained in:
14
tests/test_cli.py
Normal file
14
tests/test_cli.py
Normal file
@ -0,0 +1,14 @@
|
||||
import os
|
||||
import unittest
|
||||
import jc.cli
|
||||
|
||||
|
||||
class MyTests(unittest.TestCase):
|
||||
def test_cli(self):
|
||||
commands = {
|
||||
"jc -p systemctl list-sockets": "systemctl list-sockets | jc --systemctl-ls -p",
|
||||
"jc -p systemctl list-unit-files": "systemctl list-unit-files | jc --systemctl-luf -p",
|
||||
}
|
||||
|
||||
for command, expected_command in commands.items():
|
||||
self.assertEquals(jc.cli.generate_magic_command(command.split(" "))[1], expected_command)
|
Reference in New Issue
Block a user