def mock_cmd(self, release, *cmd, **kwargs):
        """Run a mock command in the chroot for a given release"""
        fmt = '{mock_cmd}'
        if kwargs.get('new_chroot') is True:
            fmt +=' --new-chroot'
        fmt += ' --configdir={mock_dir}'
        return self.call(fmt.format(**release).split()
                         + list(cmd))
Run a mock command in the chroot for a given release