cli_test.py 590 B

12345678910111213141516
  1. from __future__ import unicode_literals
  2. from __future__ import absolute_import
  3. from .. import unittest
  4. from fig.cli.main import TopLevelCommand
  5. from fig.packages.six import StringIO
  6. class CLITestCase(unittest.TestCase):
  7. def test_yaml_filename_check(self):
  8. command = TopLevelCommand()
  9. command.base_dir = 'tests/fixtures/longer-filename-figfile'
  10. self.assertTrue(command.project.get_service('definedinyamlnotyml'))
  11. def test_help(self):
  12. command = TopLevelCommand()
  13. with self.assertRaises(SystemExit):
  14. command.dispatch(['-h'], None)