def test_main__returns_false_if_missing_tools(): with mock.patch('imhotep.app.gen_imhotep') as mock_gen: with mock.patch('imhotep.app.parse_args') as mock_parser: mock_parser.return_value = MockParserRetval() mock_gen.side_effect = UnknownTools('tools') assert main() is False
def test_main__returns_false_if_no_commit_info(): with mock.patch('imhotep.app.gen_imhotep') as mock_gen: with mock.patch('imhotep.app.parse_args') as mock_parser: mock_parser.return_value = MockParserRetval() mock_gen.side_effect = NoCommitInfo() assert main() is False
def test_main__sanity(): with mock.patch('imhotep.app.gen_imhotep') as mock_gen: with mock.patch('imhotep.app.parse_args') as mock_parser: mock_parser.return_value = MockParserRetval() main() assert mock_gen.called