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_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'