Files
edx-platform/common/lib/conftest.py
2019-07-16 16:11:02 +05:00

27 lines
729 B
Python

"""Code run by pylint before running any tests."""
# Patch the xml libs before anything else.
from __future__ import absolute_import
import pytest
from safe_lxml import defuse_xml_libs
defuse_xml_libs()
@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='': []
)