Fixes #602 Allowing help $cmd with no figfile
Signed-off-by: Michael A. Smith <michael@smith-li.com>
This commit is contained in:
parent
1bd3d0dd77
commit
782a46fd60
3 changed files with 15 additions and 0 deletions
0
tests/fixtures/no-figfile/.gitignore
vendored
Normal file
0
tests/fixtures/no-figfile/.gitignore
vendored
Normal file
|
|
@ -25,6 +25,16 @@ class CLITestCase(DockerClientTestCase):
|
|||
def project(self):
|
||||
return self.command.get_project(self.command.get_config_path())
|
||||
|
||||
def test_help(self):
|
||||
old_base_dir = self.command.base_dir
|
||||
self.command.base_dir = 'tests/fixtures/no-figfile'
|
||||
with self.assertRaises(SystemExit) as exc_context:
|
||||
self.command.dispatch(['help', 'up'], None)
|
||||
self.assertIn('Usage: up [options] [SERVICE...]', str(exc_context.exception))
|
||||
# self.project.kill() fails during teardown
|
||||
# unless there is a figfile.
|
||||
self.command.base_dir = old_base_dir
|
||||
|
||||
@patch('sys.stdout', new_callable=StringIO)
|
||||
def test_ps(self, mock_stdout):
|
||||
self.project.get_service('simple').create_container()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue