# Path: jirafs/utils.py
# def run_command_method_with_kwargs(command, method=None, **kwargs):
#     if method is None:
#         method = "main"
#     installed_commands = get_installed_commands()
#     return getattr(installed_commands[command](), method)(**kwargs)
# 
# Path: tests/commands/base.py
# class BaseCommandTestCase(BaseTestCase):
#     def setUp(self):
#         super(BaseCommandTestCase, self).setUp()
#         self.arbitrary_ticket_number = "ALPHA-123"
#         self.root_folder = tempfile.mkdtemp()
#         self.mock_jira = mock.MagicMock()
#         self.mock_jira.issue.return_value = self.rehydrate_issue("basic.issue.json")
#         self.mock_get_jira = lambda _, config=None: self.mock_jira
# 
#         with patch(
#             "jirafs.ticketfolder.TicketFolder.get_remotely_changed"
#         ) as get_remotely_changed:
#             get_remotely_changed.return_value = []
#             self.ticketfolder = run_command_method_with_kwargs(
#                 "clone",
#                 url="http://arbitrary.com/browse/ALPHA-123",
#                 jira=self.mock_get_jira,
#                 path=os.path.join(
#                     self.root_folder,
#                     self.arbitrary_ticket_number,
#                 ),
#             )


from mock import call, patch
from jirafs.utils import run_command_method_with_kwargs
from .base import BaseCommandTestCase
                )

            self.assertEqual(0, len(update.call_args_list))

    def test_push_basic(self):
        status_result = {
            "ready": {
                "files": [],
                "fields": {
                    "somefield": (
                        "one",
                        "two",
                        "two",
                    ),
                    "otherfield": (
                        "one",
                        "three",
                        "three",
                    ),
                },
                "links": {},
                "deleted": [],
            }
        }

        with patch.object(self.ticketfolder, "status") as status:
            status.return_value = status_result
            with patch.object(self.ticketfolder.issue, "update") as update:
                with patch("jirafs.commands.pull.Command.main") as pull:
                    pull.return_value = True, True

# Path: jirafs/utils.py
# def run_command_method_with_kwargs(command, method=None, **kwargs):
#     if method is None:
#         method = "main"
#     installed_commands = get_installed_commands()
#     return getattr(installed_commands[command](), method)(**kwargs)
# 
# Path: tests/commands/base.py
# class BaseCommandTestCase(BaseTestCase):
#     def setUp(self):
#         super(BaseCommandTestCase, self).setUp()
#         self.arbitrary_ticket_number = "ALPHA-123"
#         self.root_folder = tempfile.mkdtemp()
#         self.mock_jira = mock.MagicMock()
#         self.mock_jira.issue.return_value = self.rehydrate_issue("basic.issue.json")
#         self.mock_get_jira = lambda _, config=None: self.mock_jira
# 
#         with patch(
#             "jirafs.ticketfolder.TicketFolder.get_remotely_changed"
#         ) as get_remotely_changed:
#             get_remotely_changed.return_value = []
#             self.ticketfolder = run_command_method_with_kwargs(
#                 "clone",
#                 url="http://arbitrary.com/browse/ALPHA-123",
#                 jira=self.mock_get_jira,
#                 path=os.path.join(
#                     self.root_folder,
#                     self.arbitrary_ticket_number,
#                 ),
#             )


# Path: tests/commands/test_push.py
from mock import call, patch
from jirafs.utils import run_command_method_with_kwargs
from .base import BaseCommandTestCase

                )

            self.assertEqual(0, len(update.call_args_list))

    def test_push_basic(self):
        status_result = {
            "ready": {
                "files": [],
                "fields": {
                    "somefield": (
                        "one",
                        "two",
                        "two",
                    ),
                    "otherfield": (
                        "one",
                        "three",
                        "three",
                    ),
                },
                "links": {},
                "deleted": [],
            }
        }

        with patch.object(self.ticketfolder, "status") as status:
            status.return_value = status_result
            with patch.object(self.ticketfolder.issue, "update") as update:
                with patch("jirafs.commands.pull.Command.main") as pull:
                    pull.return_value = True, True

                    run_command_method_with_kwargs(