fix: add command for wutta make-appdir
This commit is contained in:
parent
45ea5c5bdc
commit
c1108e3102
6 changed files with 99 additions and 0 deletions
25
tests/cli/test_make_appdir.py
Normal file
25
tests/cli/test_make_appdir.py
Normal file
|
@ -0,0 +1,25 @@
|
|||
# -*- coding: utf-8; -*-
|
||||
|
||||
import os
|
||||
from unittest.mock import MagicMock, patch
|
||||
|
||||
from wuttjamaican.testing import ConfigTestCase
|
||||
from wuttjamaican.cli import make_appdir as mod
|
||||
from wuttjamaican.app import AppHandler
|
||||
|
||||
|
||||
here = os.path.dirname(__file__)
|
||||
example_conf = os.path.join(here, 'example.conf')
|
||||
|
||||
|
||||
class TestMakeAppdir(ConfigTestCase):
|
||||
|
||||
def test_basic(self):
|
||||
appdir = os.path.join(self.tempdir, 'app')
|
||||
ctx = MagicMock(params={'config_paths': [example_conf],
|
||||
'appdir_path': appdir})
|
||||
ctx.parent.wutta_config = self.config
|
||||
|
||||
with patch.object(AppHandler, 'make_appdir') as make_appdir:
|
||||
mod.make_appdir(ctx)
|
||||
make_appdir.assert_called_once_with(appdir)
|
Loading…
Add table
Add a link
Reference in a new issue