def test_didnt_choose_subassistant(self): env = populate_dapath( {'assistants': { 'crt': ['a.yaml', { 'a': ['b.yaml'] }] }}) res = env.run_da('create a', expect_error=True, expect_stderr=True) assert 'You have to select a subassistant' in res.stderr
def test_subassistants_help(self): env = populate_dapath({'assistants': {'crt': ['a.yaml', {'a': ['b.yaml']}]}}) res = env.run_da('create a -h') assert res.stdout == '\n'.join([ 'usage: create a [-h] {b} ...', '', 'optional arguments:', ' -h, --help show this help message and exit', '', 'subassistants:', ' Following subassistants will help you with setting up your project.', '', ' {b}', ''])
def test_subassistants_help(self): env = populate_dapath( {'assistants': { 'crt': ['a.yaml', { 'a': ['b.yaml'] }] }}) res = env.run_da('create a -h') assert res.stdout == '\n'.join([ 'usage: create a [-h] {b} ...', '', 'optional arguments:', ' -h, --help show this help message and exit', '', 'subassistants:', ' Following subassistants will help you with setting up your project.', '', ' {b}', '' ])
def test_didnt_choose_subassistant(self): env = populate_dapath({'assistants': {'crt': ['a.yaml', {'a': ['b.yaml']}]}}) res = env.run_da('create a', expect_error=True, expect_stderr=True) assert 'You have to select a subassistant' in res.stderr