Update tests to add the new call into the mocks
@@ -220,6 +220,7 @@ class BuildEnvironmentTests(TestCase):
returns = [
((b'', b''), 0), # sphinx-build html
((b'', b''), 0), # sphinx-build pdf
+ ((b'1.5', b''), 0), # sphinx version check
((b'', b''), 1), # latex
((b'', b''), 0), # makeindex
((b'', b''), 0), # latex
@@ -236,7 +237,7 @@ class BuildEnvironmentTests(TestCase):
with build_env:
task.build_docs()
- self.assertEqual(self.mocks.popen.call_count, 7)
+ self.assertEqual(self.mocks.popen.call_count, 8)
self.assertTrue(build_env.failed)
@mock.patch('readthedocs.doc_builder.config.load_config')
@@ -271,6 +272,7 @@ class BuildEnvironmentTests(TestCase):
returns = [
((b'', b''), 0), # sphinx-build html
((b'', b''), 0), # sphinx-build pdf
+ ((b'1.6', b''), 0), # sphinx version check
((b'Output written on foo.pdf', b''), 1), # latex
((b'', b''), 0), # makeindex
((b'', b''), 0), # latex
@@ -287,7 +289,7 @@ class BuildEnvironmentTests(TestCase):
with build_env:
task.build_docs()
- self.assertEqual(self.mocks.popen.call_count, 7)
+ self.assertEqual(self.mocks.popen.call_count, 8)
self.assertTrue(build_env.successful)
@mock.patch('readthedocs.projects.tasks.api_v2')
