Esempio n. 1
0
    def test_main_except_general_exception(self, mock_conf):
        mock_conf.command.func.side_effect = Exception

        expected_err_msg = "murano-manage command failed:"

        with self.assertRaisesRegexp(SystemExit, expected_err_msg):
            manage.main()
Esempio n. 2
0
    def test_main_except_runtime_error(self, mock_conf):
        mock_conf.side_effect = RuntimeError

        with self.assertRaisesRegexp(SystemExit, 'ERROR:'):
            manage.main()