forked from openedx/edx-platform
-
Notifications
You must be signed in to change notification settings - Fork 0
/
conftest.py
26 lines (22 loc) · 850 Bytes
/
conftest.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
"""
Default unit test configuration and fixtures.
"""
from __future__ import absolute_import, unicode_literals
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
@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='': []
)