Example #1
0
import unittest

from os.path import dirname, join, isfile
from tempfile import NamedTemporaryFile as TF

from otto.config import CmdStore
from otto.cmds import BASE_CMDS
from otto.utils import isOttoCmd

TEST_DIR = dirname(__file__)
DEFAULT_MAP = map = {
        'base': BASE_CMDS.keys(),
        }

PACK_NAME = 'test'
PACK_DIR = join(TEST_DIR, '.otto/test')
PACK_MAP = {
        PACK_NAME: [
            'test1',
            'test2',
            ],
        }

class TestCmdStore(unittest.TestCase):
    @classmethod
    def setUpClass(cls):
        from otto.utils import shell, ChangePath, info
        info("Setting up CmdStore tests...")
        with ChangePath('otto/test/'):
            shell('otto dr')