This will remove imports from __future__ that are no longer needed. https://docs.python.org/3.5/library/2to3.html#2to3fixer-future
33 lines
953 B
Python
33 lines
953 B
Python
"""
|
|
Default unit test configuration and fixtures.
|
|
"""
|
|
|
|
from unittest import TestCase
|
|
|
|
import pytest
|
|
|
|
# Import hooks and fixture overrides from the cms package to
|
|
# avoid duplicating the implementation
|
|
|
|
from cms.conftest import _django_clear_site_cache, pytest_configure # pylint: disable=unused-import
|
|
|
|
# When using self.assertEquals, diffs are truncated. We don't want that, always
|
|
# show the whole diff.
|
|
TestCase.maxDiff = None
|
|
|
|
|
|
@pytest.fixture(autouse=True)
|
|
def no_webpack_loader(monkeypatch):
|
|
monkeypatch.setattr(
|
|
"webpack_loader.templatetags.webpack_loader.render_bundle",
|
|
lambda entry, extension=None, config='DEFAULT', attrs='': ''
|
|
)
|
|
monkeypatch.setattr(
|
|
"webpack_loader.utils.get_as_tags",
|
|
lambda entry, extension=None, config='DEFAULT', attrs='': []
|
|
)
|
|
monkeypatch.setattr(
|
|
"webpack_loader.utils.get_files",
|
|
lambda entry, extension=None, config='DEFAULT', attrs='': []
|
|
)
|