'Test full build'

def test_build(self):

    project = get(Project, slug='project-1', documentation_type='sphinx', conf_py_file='test_conf.py', versions=[fixture()])
    version = project.versions.all()[0]
    self.mocks.configure_mock('api_versions', {'return_value': [version]})
    self.mocks.configure_mock('api', {'get.return_value': {'downloads': 'no_url_here'}})
    self.mocks.patches['html_build'].stop()
    build_env = LocalEnvironment(project=project, version=version, build={})
    python_env = Virtualenv(version=version, build_env=build_env)
    config = ConfigWrapper(version=version, yaml_config=create_load()()[0])
    task = UpdateDocsTask(build_env=build_env, project=project, python_env=python_env, version=version, search=False, localmedia=False, config=config)
    task.build_docs()
    self.assertEqual(self.mocks.popen.call_count, 3)
    cmd = self.mocks.popen.call_args_list[2][0]
    self.assertRegexpMatches(cmd[0][0], 'python')
    self.assertRegexpMatches(cmd[0][1], 'sphinx-build')
