class TestGoogleCode(TrackerTest): name = 'google code' default_tracker_config = TrackerConfig('pytox') tracker_config = {'no project': TrackerConfig('foobar')} PYTOX_URL = 'http://code.google.com/p/pytox/issues/detail?id={0}' issues = { 'fixed': Issue(id='2', closed=True, url=PYTOX_URL.format('2'), title='Hudson exists with SUCCESS status even if tox ' 'failed with ERROR'), 'invalid': Issue(id='5', title='0.7: "error: File exists"', closed=True, url=PYTOX_URL.format('5')), 'wontfix': Issue(id='6', title='Copy modules from site packages', closed=True, url=PYTOX_URL.format('6')), 'no issue': '1000', 'no project': '1', }
class TestLaunchpad(TrackerTest): pytestmark = pytest.mark.skipif(str('launchpadlib is None')) name = 'launchpad' default_tracker_config = TrackerConfig('inkscape') tracker_config = { 'wrong project': TrackerConfig('foo'), 'invalid': TrackerConfig('eject (Ubuntu)') } issues = { 'closed': Issue('647789', title='tries to install file(s) outside of ' './configure\'s --prefix', closed=True, url='https://bugs.launchpad.net/bugs/647789'), 'invalid': Issue('173307', closed=True, title='All users should be able to eject CDs and ' 'removable media', url='https://bugs.launchpad.net/bugs/173307'), 'wrong project': '1000', 'no issue': '1000000', }
class TestBitBucket(ScopedProjectTrackerTest): name = 'bitbucket' default_tracker_config = TrackerConfig('birkenfeld/sphinx') tracker_config = {'no project': TrackerConfig('lunar/foobar')} SPHINX_URL = 'https://bitbucket.org/birkenfeld/sphinx/issue/{0}/' issues = { 'resolved': Issue(id='478', closed=True, url=SPHINX_URL.format('478'), title='Adapt py:decorator from Python docs'), 'invalid': Issue(id='327', closed=True, url=SPHINX_URL.format('327'), title='Spaces at the end of console messages'), 'duplicate': Issue(id='733', closed=True, url=SPHINX_URL.format('733'), title='byte/str conversion fails on Python 3.2'), 'no project': '10', 'no issue': '10000' }
class TestDebian(TrackerTest): pytestmark = pytest.mark.skipif(b'debianbts is None') name = 'debian' tracker_config = {'fixed': TrackerConfig('ldb-tools'), 'no project': TrackerConfig('release.debian.org')} DEBIAN_URL = 'http://bugs.debian.org/cgi-bin/bugreport.cgi?bug={0}' issues = { 'fixed': Issue(id='584227', title='ldb-tools: missing ldb(7) manpage', closed=True, url=DEBIAN_URL.format('584227')), 'no project': '1', }
class TestGitHub(ScopedProjectTrackerTest): name = 'github' default_tracker_config = TrackerConfig('lunaryorn/pyudev') tracker_config = {'no project': TrackerConfig('lunaryorn/foobar')} issues = { 'closed': Issue(id='2', title=u'python 3 support', closed=True, url='https://github.com/lunaryorn/pyudev/issues/2'), 'no project': '10', 'no issue': '1000', }
def test_event_emitted(app, mock_lookup): """ Test that issue resolval emits the event with the right arguments. """ assert mock_lookup.call_count == 1 mock_lookup.assert_called_with( app, TrackerConfig.from_sphinx_config(app.config), '10')
def test_tracker_config_from_sphinx_config_implicit_project(app): """ Test that TrackerConfig uses the Sphinx project name, if the issuetracker project was not explicitly set. """ tracker_config = TrackerConfig.from_sphinx_config(app.config) assert tracker_config.project == 'eggs' assert tracker_config.url == 'http://example.com'
def test_tracker_config_from_sphinx_config_trailing_slash(app): """ Test that TrackerConfig strips trailing slashes when creating from sphinx config, too. """ tracker_config = TrackerConfig.from_sphinx_config(app.config) assert tracker_config.project == 'eggs' assert tracker_config.url == 'http://example.com'
def test_tracker_config_from_sphinx_config_explicit_project(app): """ Test that TrackerConfig uses the issuetracker project, if it was explicitly set. """ tracker_config = TrackerConfig.from_sphinx_config(app.config) assert tracker_config.project == 'spam' assert tracker_config.url == 'http://example.com'
class TestLaunchpad(TrackerTest): pytestmark = pytest.mark.skipif(b'launchpadlib is None') name = 'launchpad' default_tracker_config = TrackerConfig('inkscape') tracker_config = {'wrong project': TrackerConfig('foo'), 'invalid': TrackerConfig('null')} issues = { 'closed': Issue('647789', title='tries to install file(s) outside of ' './configure\'s --prefix', closed=True, url='https://bugs.launchpad.net/bugs/647789'), 'invalid': Issue('1000', closed=True, title='There are too many bug reports in Malone', url='https://bugs.launchpad.net/bugs/1000'), 'wrong project': '1000', 'no issue': '1000000', }