Exemplo 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()
Exemplo n.º 2
0
    def test_main_except_runtime_error(self, mock_conf):
        mock_conf.side_effect = RuntimeError

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