kiwi-el8/test/unit/help_test.py
Marcus Schäfer e6cc5bfa09 Move from nose to pytest
nose is no longer maintained, thus we have to move to another
testing system. This commit updates the tox setup and all tests
to use pytest instead of nose.
2016-03-14 12:23:14 +01:00

23 lines
464 B
Python

import sys
from mock import patch
from .test_helper import *
from kiwi.help import Help
from kiwi.exceptions import *
class TestHelp(object):
def setup(self):
self.help = Help()
@raises(KiwiHelpNoCommandGiven)
def test_show(self):
self.help.show(None)
@patch('subprocess.call')
def test_show_command(self, mock_process):
self.help.show('foo')
mock_process.assert_called_once_with('man 2 foo', shell=True)