1
0
mirror of https://github.com/nvbn/thefuck.git synced 2025-03-20 09:39:01 +00:00
thefuck/tests/rules/test_dnf_install.py
2016-01-05 23:00:09 -02:00

14 lines
543 B
Python

import pytest
from mock import Mock, patch
from thefuck.rules import dnf_install
from tests.utils import Command
@pytest.mark.parametrize('command, new_command', [
(Command('dfn install python'), 'sudo dnf install python'),
(Command('dnf istall python'), 'sudo dnf install python'),
(Command('dfn install python'), 'sudo dnf install python'),
(Command('dfn install python ruby'), 'sudo dnf install python ruby')])
def test_get_new_command(command, new_command):
assert dnf_install.get_new_command(command) == new_command