Skip to content

Commit

Permalink
Mock the builder as well
Browse files Browse the repository at this point in the history
  • Loading branch information
GaretJax committed Feb 13, 2016
1 parent 20f075b commit d151de7
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion sphinx_autobuild/test/test_autobuild.py
Expand Up @@ -22,12 +22,14 @@ def patched_args(sys_args, monkeypatch):
))
@mock.patch.object(observers.Observer, 'schedule')
@mock.patch.object(livereload.Server, 'serve')
@mock.patch('sphinx_autobuild.SphinxBuilder.build')
@mock.patch('os.makedirs')
def test_autobuild(mock_makedirs, mock_serve, mock_schedule):
def test_autobuild(mock_makedirs, mock_builder, mock_serve, mock_schedule):
"""
Test autobuild entry point.
"""
main()
mock_builder.assert_called_once_with()
mock_makedirs.assert_called_once_with('/output')
mock_serve.assert_called_once_with(
host='127.0.0.1', root='/output', port=8000)
Expand Down

0 comments on commit d151de7

Please sign in to comment.