@patch('prestoadmin.connector.os.listdir')
    @patch('prestoadmin.connector.os.path.isdir')
    def test_add_permission_denied(self, isdir_mock, listdir_mock):
        isdir_mock.return_value = True
        error_msg = ('Permission denied')
        listdir_mock.side_effect = OSError(13, error_msg)
        fabric.api.env.host = 'localhost'
        self.assertRaisesRegexp(SystemExit, '\[localhost\] %s' % error_msg,
                                connector.add)
dataset/ETHPy150Open prestodb/presto-admin/tests/unit/test_connector.py/TestConnector.test_add_permission_denied/original