diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 290b401c836596cea709037b518a8995faef0161..0818db00dfc9478e37cc0c582c55fdb04b19960e 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -2,6 +2,7 @@ Unreleased ===================================================== * Fix compatibility with Django 4.1 +* [Dev] Fix tests Version 6.0.2 (2022-09-05) ===================================================== diff --git a/django_yarnpkg/test_settings.py b/django_yarnpkg/test_settings.py index ca462cf2f7ecf26c84165c443c57e97e014f626f..223c9a53f804a99bc0be04150a2d8ee3c95dc248 100644 --- a/django_yarnpkg/test_settings.py +++ b/django_yarnpkg/test_settings.py @@ -35,3 +35,12 @@ DATABASES = { 'PORT': '', } } + +TEMPLATES = [ + { + 'BACKEND': 'django.template.backends.django.DjangoTemplates', + 'DIRS': [], + 'APP_DIRS': True, + 'OPTIONS': {}, + }, +] diff --git a/django_yarnpkg/tests/base.py b/django_yarnpkg/tests/base.py index b8e82a6faacc3ef72ab28c9c21aaf9f71da3c35f..6b3c27601668b35e35304b83942e483c57b32029 100644 --- a/django_yarnpkg/tests/base.py +++ b/django_yarnpkg/tests/base.py @@ -24,8 +24,8 @@ class BaseYarnCase(TestCase): def tearDown(self): self._remove_node_modules_root() - def _remove_components_root(self): - """Remove components root if exists""" + def _remove_node_modules_root(self): + """Remove node_modules root if exists""" if os.path.exists(TEST_NODE_MODULES_ROOT): shutil.rmtree(TEST_NODE_MODULES_ROOT) diff --git a/django_yarnpkg/tests/test_finders.py b/django_yarnpkg/tests/test_finders.py index 53378a5c2333641abff2bcf00e15f2fcfa1f8d03..42565373cbc432e4e4b6e40b2b746b0777213a71 100644 --- a/django_yarnpkg/tests/test_finders.py +++ b/django_yarnpkg/tests/test_finders.py @@ -72,7 +72,6 @@ class SimpleNodeModulesFinderCase(_MakeDirsTestCase): """ If both folders exist, only 'yarn_node_modules' should be used. """ - self.makedirs(os.path.join(conf.NODE_MODULES_ROOT, 'node_modules')) self.test_list_existent(leaf_name='node_modules') diff --git a/django_yarnpkg/tests/test_yarn.py b/django_yarnpkg/tests/test_yarn.py index 44d404cfe7246fc1e53a2e19249c455804896ffa..90e8efb9721de840406d573f4997967891187d32 100644 --- a/django_yarnpkg/tests/test_yarn.py +++ b/django_yarnpkg/tests/test_yarn.py @@ -98,14 +98,11 @@ class YarnCommandCase(BaseYarnCase): yarn_adapter.install = MagicMock() self._orig_call = yarn_adapter.call_yarn yarn_adapter.call_yarn = MagicMock() - self._orig_freeze = yarn_adapter.freeze - yarn_adapter.freeze = MagicMock() def tearDown(self): super(YarnCommandCase, self).tearDown() yarn_adapter.install = self._original_install yarn_adapter.call_yarn = self._orig_call - yarn_adapter.freeze = self._orig_freeze def test_install_without_params(self): """Test that yarn install without param identical