kiwi-el8/test/unit/help_test.py
Marcus Schäfer 40e6308aa9 Port application from python 2.7 to 3.4
For new applications like this kiwi version and its use cases
it is better to base it on a more recent python version
2016-02-17 22:38:38 +01:00

23 lines
487 B
Python

import sys
from nose.tools import *
from mock import patch
from . import nose_helper
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)