def test_find_exe(self, mock_fe): mock_fe.return_value = '/usr/bin/python' self.assertEqual(utils.find_exe('python'), '/usr/bin/python') mock_fe.return_value = None with self.assertRaises(NotFoundException): utils.find_exe('python')