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,
                                catalog.add)