def test_startplugin(self): mock_args = MagicMock(name='Mock Args') mock_args.name = 'pluginname' with patch.object(commandline.scaffold_utils, 'start_plugin') as sp: commandline.startplugin(mock_args) sp.assert_called_with('pluginname', commandline.USERLAND_HERE)