mirror of
https://github.com/gryf/fs-uae-wrapper.git
synced 2026-02-01 05:25:46 +01:00
Make plain wrapper module use base.Base class
This commit is contained in:
@@ -11,8 +11,12 @@ from fs_uae_wrapper import utils
|
||||
|
||||
class TestPlainModule(TestCase):
|
||||
|
||||
@mock.patch('subprocess.call')
|
||||
def test_show(self, subprocess_call):
|
||||
@mock.patch('fs_uae_wrapper.utils.run_command')
|
||||
def test_run(self, run_command):
|
||||
wrapper = plain.Wrapper('some.conf', utils.CmdOption(), {})
|
||||
wrapper.run()
|
||||
run_command.assert_called_once_with(['fs-uae', 'some.conf'])
|
||||
|
||||
plain.run('some.conf', utils.CmdOption(), None)
|
||||
subprocess_call.assert_called_once()
|
||||
def test_clean(self):
|
||||
wrapper = plain.Wrapper('some.conf', utils.CmdOption(), {})
|
||||
self.assertIsNone(wrapper.clean())
|
||||
|
||||
@@ -28,7 +28,7 @@ class TestWrapper(TestCase):
|
||||
os.unlink(self.fname)
|
||||
sys.argv = self._argv[:]
|
||||
|
||||
@mock.patch('fs_uae_wrapper.plain.run')
|
||||
@mock.patch('fs_uae_wrapper.plain.Wrapper.run')
|
||||
def test_run(self, mock_plain_run):
|
||||
|
||||
sys.argv.append('--help')
|
||||
|
||||
Reference in New Issue
Block a user