================================
 Integration with zest.releaser
================================

We register an entrypoint that zest.releaser calls.
We check this by observing the user-visible output.

We need to mock getting the configuration, since the real version reads from
``~/.pypirc``:

>>> import os
>>> open(os.path.join(svnsourcedir, '.pypirc'), 'w').write("""
... [gocept.zestreleaser.customupload]
... tha.example = example.com:/var/www
... """)
>>> def fake_expanduser(path):
...     return path.replace('~', svnsourcedir)

>>> import mock
>>> import zest.releaser.release
>>> import zest.releaser.utils
>>> zest.releaser.utils.TESTMODE = True
>>> zest.releaser.utils.answers_for_testing = ['y', 'y', 'n', 'no', 'n']
>>> os.chdir(svnsourcedir)
>>> with mock.patch('os.path.expanduser', new=fake_expanduser):
...     zest.releaser.release.main()
Checking data dict
...
Question: Check out the tag (for tweaks or pypi/distutils server upload) (Y/n)?
Our reply: y
...
running sdist
...
Question: Upload to example.com:/var/www (Y/n)?
Our reply: n
