# 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/base.py
# class BaseTestCase(TestCase):
#     def get_asset_path(self, filename):
#         return os.path.join(os.path.dirname(__file__), "assets", filename)
# 
#     def get_asset_contents(self, filename, mode="r"):
#         path = self.get_asset_path(filename)
# 
#         with io.open(path, mode, encoding="utf-8") as r:
#             return r.read()
# 
#     def rehydrate_issue(self, filename):
#         stored = json.loads(self.get_asset_contents(filename))
#         return Issue(
#             stored["options"],
#             None,
#             stored["raw"],
#         )
# 
#     def get_empty_status(self):
#         return {
#             "ready": {
#                 "files": [],
#                 "links": {},
#                 "fields": {},
#                 "new_comment": "",
#                 "deleted": [],
#             },
#             "uncommitted": {
#                 "files": [],
#                 "links": {},
#                 "fields": {},
#                 "new_comment": "",
#                 "deleted": [],
#             },
#             "local_uncommitted": {"files": []},
#             "conflicts": {},
#             "up_to_date": True,
#         }


import os
import tempfile
import mock
from mock import patch
from jirafs.utils import run_command_method_with_kwargs
from ..base import BaseTestCase





class BaseCommandTestCase(BaseTestCase):
    def setUp(self):
        super(BaseCommandTestCase, self).setUp()

# 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/base.py
# class BaseTestCase(TestCase):
#     def get_asset_path(self, filename):
#         return os.path.join(os.path.dirname(__file__), "assets", filename)
# 
#     def get_asset_contents(self, filename, mode="r"):
#         path = self.get_asset_path(filename)
# 
#         with io.open(path, mode, encoding="utf-8") as r:
#             return r.read()
# 
#     def rehydrate_issue(self, filename):
#         stored = json.loads(self.get_asset_contents(filename))
#         return Issue(
#             stored["options"],
#             None,
#             stored["raw"],
#         )
# 
#     def get_empty_status(self):
#         return {
#             "ready": {
#                 "files": [],
#                 "links": {},
#                 "fields": {},
#                 "new_comment": "",
#                 "deleted": [],
#             },
#             "uncommitted": {
#                 "files": [],
#                 "links": {},
#                 "fields": {},
#                 "new_comment": "",
#                 "deleted": [],
#             },
#             "local_uncommitted": {"files": []},
#             "conflicts": {},
#             "up_to_date": True,
#         }


# Path: tests/commands/base.py
import os
import tempfile
import mock
from mock import patch
from jirafs.utils import run_command_method_with_kwargs
from ..base import BaseTestCase






class BaseCommandTestCase(BaseTestCase):
    def setUp(self):
        super(BaseCommandTestCase, self).setUp()

        self.arbitrary_ticket_number = "ALPHA-123"