old_contents: import factory
  import pytest
  from django.core.urlresolvers import reverse
  from pytest_factoryboy import register
  from rest_framework.test import APIClient
  
  from adhocracy4.test import factories as a4_factories
  
  from . import factories
  
  register(factories.UserFactory)
  register(factories.UserFactory, 'user2')
  register(factories.AdminFactory, 'admin')
  register(factories.OrganisationFactory)
  register(factories.PhaseFactory)
  register(factories.ContentTypeFactory)
  register(factories.CommentFactory)
  register(factories.RatingFactory)
  register(factories.ModeratorStatementFactory)
  
  register(a4_factories.ProjectFactory)
  register(a4_factories.ModuleFactory)
  
  
  @pytest.fixture
  def apiclient():
      return APIClient()
  
  
  @pytest.fixture
  def smallImage():
      return factory.django.ImageField(width=200, height=200)
  
  
  @pytest.fixture
  def bigImage():
      return factory.django.ImageField(width=1400, height=1400)
  
  
  @pytest.fixture
  def ImageBMP():
      return factory.django.ImageField(width=1400, height=1400, format='BMP')
  
  
  @pytest.fixture
  def ImagePNG():
      return factory.django.ImageField(width=1400, height=1400, format='PNG')
  
  
  @pytest.fixture
  def image_factory():
      return factories.ImageFactory()
  
  
  @pytest.fixture
  def login_url():
      return reverse('account_login')
  
  
  @pytest.fixture
  def logout_url():
      return reverse('account_logout')
  
  
  @pytest.fixture
  def signup_url():
      return reverse('account_signup')
  
new_contents: import factory
  import pytest
  from django.core.urlresolvers import reverse
  from pytest_factoryboy import register
  from rest_framework.test import APIClient
  
  from adhocracy4.test import factories as a4_factories
  from adhocracy4.test import helpers
  
  from . import factories
  
  
  def pytest_configure(config):
      """Patch backgroun_task decorators for all tests."""
      helpers.patch_background_task_decorator().start()
  
  
  register(factories.UserFactory)
  register(factories.UserFactory, 'user2')
  register(factories.AdminFactory, 'admin')
  register(factories.OrganisationFactory)
  register(factories.PhaseFactory)
  register(factories.ContentTypeFactory)
  register(factories.CommentFactory)
  register(factories.RatingFactory)
  register(factories.ModeratorStatementFactory)
  
  register(a4_factories.ProjectFactory)
  register(a4_factories.ModuleFactory)
  
  
  @pytest.fixture
  def apiclient():
      return APIClient()
  
  
  @pytest.fixture
  def smallImage():
      return factory.django.ImageField(width=200, height=200)
  
  
  @pytest.fixture
  def bigImage():
      return factory.django.ImageField(width=1400, height=1400)
  
  
  @pytest.fixture
  def ImageBMP():
      return factory.django.ImageField(width=1400, height=1400, format='BMP')
  
  
  @pytest.fixture
  def ImagePNG():
      return factory.django.ImageField(width=1400, height=1400, format='PNG')
  
  
  @pytest.fixture
  def image_factory():
      return factories.ImageFactory()
  
  
  @pytest.fixture
  def login_url():
      return reverse('account_login')
  
  
  @pytest.fixture
  def logout_url():
      return reverse('account_logout')
  
  
  @pytest.fixture
  def signup_url():
      return reverse('account_signup')
  
subject: Use sync email for all tests.