Permalink
Browse files

tests: Make sure the help message is printed if no command is given

  • Loading branch information...
1 parent a022a26 commit a90431e9b486ba92c2c7db1e3428e94257519bae @Turbo87 Turbo87 committed Jan 25, 2014
Showing with 4 additions and 1 deletion.
  1. +4 −1 tests.py
View
5 tests.py
@@ -473,12 +473,15 @@ def test_run_not_existing(self, capsys):
assert code == 2
assert 'OK' not in out
- def test_run_no_name(self):
+ def test_run_no_name(self, capsys):
manager = Manager(self.app)
+ manager.add_command('simple', SimpleCommand())
code = run('manage.py', lambda: manager.run())
+ out, err = capsys.readouterr()
assert code == 2
+ assert 'simple command' in out
def test_run_good_options(self, capsys):

0 comments on commit a90431e

Please sign in to comment.