Mark building test as community only
These tests performs a call to our API from a signal hook in our
corporate site and the API call in that file is not mocked, so they fail.
+# -*- coding: utf-8 -*-
from __future__ import division, print_function, unicode_literals
import os
-import json
import shutil
from os.path import exists
+import pytest
from tempfile import mkdtemp
from django.contrib.auth.models import User
from django_dynamic_fixture import get
from mock import patch, MagicMock
-from readthedocs.builds.constants import BUILD_STATE_INSTALLING, BUILD_STATE_FINISHED, LATEST
+from readthedocs.builds.constants import LATEST
from readthedocs.projects.exceptions import RepositoryError
from readthedocs.builds.models import Build
from readthedocs.projects.models import Project
from readthedocs.projects import tasks
from readthedocs.rtd_tests.utils import (
- create_git_branch, create_git_tag, delete_git_branch, delete_git_tag)
+ create_git_branch, create_git_tag, delete_git_branch)
from readthedocs.rtd_tests.utils import make_test_git
from readthedocs.rtd_tests.base import RTDTestCase
from readthedocs.rtd_tests.mocks.mock_api import mock_api
-from readthedocs.doc_builder.environments import BuildEnvironment
-
class TestCeleryBuilding(RTDTestCase):
@@ -131,6 +130,7 @@ class TestCeleryBuilding(RTDTestCase):
)
self.assertTrue(result.successful())
+ @pytest.mark.community
@patch('readthedocs.projects.tasks.api_v2')
def test_check_duplicate_reserved_version_latest(self, api_v2):
create_git_branch(self.repo, 'latest')
@@ -151,6 +151,7 @@ class TestCeleryBuilding(RTDTestCase):
sync_repository.sync_repo()
api_v2.project().sync_versions.post.assert_called()
+ @pytest.mark.community
@patch('readthedocs.projects.tasks.api_v2')
def test_check_duplicate_reserved_version_stable(self, api_v2):
create_git_branch(self.repo, 'stable')
@@ -170,6 +171,7 @@ class TestCeleryBuilding(RTDTestCase):
# TODO: Check that we can build properly after
# deleting the tag.
+ @pytest.mark.community
@patch('readthedocs.projects.tasks.api_v2')
def test_check_duplicate_no_reserved_version(self, api_v2):
create_git_branch(self.repo, 'no-reserved')
