From 5888540e929ec36a2c3684d9e81939f5358a576d Mon Sep 17 00:00:00 2001 From: Iacopo Spalletti Date: Sat, 14 Nov 2020 23:45:57 +0100 Subject: [PATCH] Add support for Django 3.1 / django CMS 3.8 (#378) Drop support for Python 3.5 --- .github/workflows/test.yml | 2 +- README.rst | 16 ++++--- changes/376.feature | 1 + djangocms_installer/config/__init__.py | 2 + djangocms_installer/config/data.py | 62 +++++++++++++----------- djangocms_installer/config/settings.py | 1 - docs/libraries.rst | 4 +- docs/reference.rst | 2 +- setup.cfg | 1 + tests/base.py | 8 ++-- tests/config.py | 66 ++++++++++++-------------- tests/django.py | 48 +++++++++++++++---- tests/fixtures/configs/config-01.ini | 2 +- tests/main.py | 1 - 14 files changed, 125 insertions(+), 91 deletions(-) create mode 100644 changes/376.feature diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 33bc4435..6ef19a0c 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -8,7 +8,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - python-version: [3.8, 3.7, 3.6, 3.5] + python-version: [3.9, 3.8, 3.7, 3.6] steps: - uses: actions/checkout@v2 - name: Set up Python ${{ matrix.python-version }} diff --git a/README.rst b/README.rst index 5863b88f..eb82a43e 100644 --- a/README.rst +++ b/README.rst @@ -16,7 +16,7 @@ project. Refer to `django CMS Tutorial`_ on how to properly setup your first django CMS project. -.. warning:: Version 2.0 dropped support for Python 2.7, django CMS < 3.7 and Django < 2.2. +.. warning:: Version 2.0 dropped support for Python 2.7, 3.5, django CMS < 3.7 and Django < 2.2. More 1.2.x versions may be released after 1.2 is out in case important bugfixes will be needed. Usage @@ -68,11 +68,13 @@ Supported versions The current supported version matrix is the following: -+----------------+--------------+--------------+ -| | Django 2.2 | Django 3.0 | -+----------------+--------------+--------------+ -| django CMS 3.7 | Supported | Supported | -+----------------+--------------+--------------+ ++----------------+--------------+--------------+---------------+ +| | Django 2.2 | Django 3.0 | Django 3.1 | ++----------------+--------------+--------------+---------------+ +| django CMS 3.7 | Supported | Supported | Not supported | ++----------------+--------------+--------------+---------------+ +| django CMS 3.8 | Supported | Supported | Supported | ++----------------+--------------+--------------+---------------+ See `version 1.2`_ for older Django / django CMS versions support @@ -93,7 +95,7 @@ might work, but are not officially supported. Windows support --------------- -The installer is tested on Windows 7 with Python versions 3.4.2 and 2.7.8 installed using +The installer is tested on Windows 10 with Python version 3.8.6 installed using official MSI packages available at http://python.org. Please check that the ``.py`` extension is associated correctly with Python interpreter:: diff --git a/changes/376.feature b/changes/376.feature new file mode 100644 index 00000000..1d8a8297 --- /dev/null +++ b/changes/376.feature @@ -0,0 +1 @@ +Add support for Django 3.1 / django CMS 3.8 diff --git a/djangocms_installer/config/__init__.py b/djangocms_installer/config/__init__.py index eae91c22..34629689 100644 --- a/djangocms_installer/config/__init__.py +++ b/djangocms_installer/config/__init__.py @@ -433,6 +433,8 @@ def parse(args): requirements.extend(data.REQUIREMENTS["django-2.2"]) elif django_version == "3.0": requirements.extend(data.REQUIREMENTS["django-3.0"]) + elif django_version == "3.1": + requirements.extend(data.REQUIREMENTS["django-3.1"]) requirements.extend(data.REQUIREMENTS["default"]) diff --git a/djangocms_installer/config/data.py b/djangocms_installer/config/data.py index 3401e233..7a1af16f 100644 --- a/djangocms_installer/config/data.py +++ b/djangocms_installer/config/data.py @@ -1,4 +1,3 @@ -import sys import time bust = {"bust": time.time()} @@ -22,22 +21,18 @@ DJANGOCMS_RC = "https://github.com/divio/django-cms/archive/release/3.7.x.zip?{bust}".format(**bust) DJANGOCMS_BETA = DJANGOCMS_RC DJANGOCMS_37 = "django-cms>=3.7,<3.8" +DJANGOCMS_38 = "django-cms>=3.8,<3.9" -DJANGOCMS_SUPPORTED = ("3.7", "stable", "lts", "develop", "rc") -DJANGOCMS_STABLE = "3.7" -DJANGOCMS_LTS = "3.7" +DJANGOCMS_SUPPORTED = ("3.8", "3.7", "stable", "lts", "develop") +DJANGOCMS_STABLE = "3.8" +DJANGOCMS_LTS = "3.8" DJANGOCMS_DEFAULT = DJANGOCMS_STABLE DJANGO_DEVELOP = "https://github.com/django/django/archive/master.zip?{bust}".format(**bust) DJANGO_BETA = "https://github.com/django/django/archive/master.zip?{bust}".format(**bust) -if sys.version_info >= (3, 6): - DJANGO_SUPPORTED = ("2.2", "3.0", "stable", "lts") - DJANGO_STABLE = "3.0" - DJANGO_LTS = "2.2" -else: - DJANGO_SUPPORTED = ("2.2", "stable", "lts") - DJANGO_STABLE = "2.2" - DJANGO_LTS = "2.2" +DJANGO_SUPPORTED = ("3.1", "3.0", "2.2", "stable", "lts") +DJANGO_STABLE = "3.1" +DJANGO_LTS = "2.2" DJANGO_DEFAULT = DJANGO_STABLE @@ -57,12 +52,14 @@ } VERSION_MATRIX = { "3.7": ("2.2", "3.0"), - DJANGOCMS_BETA: ("2.2", "3.0"), - DJANGOCMS_RC: ("2.2", "3.0"), - DJANGOCMS_DEVELOP: ("2.2", "3.0"), + "3.8": ("2.2", "3.0", "3.1"), + DJANGOCMS_BETA: ("2.2", "3.1"), + DJANGOCMS_RC: ("2.2", "3.1"), + DJANGOCMS_DEVELOP: ("2.2", "3.1"), } PACKAGE_MATRIX = { "3.7": DJANGOCMS_37, + "3.8": DJANGOCMS_38, DJANGOCMS_RC: DJANGOCMS_RC, DJANGOCMS_BETA: DJANGOCMS_BETA, DJANGOCMS_DEVELOP: DJANGOCMS_DEVELOP, @@ -72,22 +69,34 @@ "default": ["html5lib>=1.0.1", "Pillow>=3.0", "six", "pytz"], "django-2.2": ["django-classy-tags>=0.9", "django-sekizai>=1.0", "django-mptt>0.9"], "django-3.0": ["django-classy-tags>=0.9", "django-sekizai>=1.0", "django-mptt>0.9"], - "cms-3.7": ["djangocms-admin-style>=1.5,<1.6", "django-treebeard>=4.0,<5.0"], + "django-3.1": ["django-classy-tags>=2.0", "django-sekizai>=2.0", "django-mptt>0.9"], + "cms-3.7": ["djangocms-admin-style>=2.0,<3.0", "django-treebeard>=4.0,<5.0"], + "cms-3.8": ["djangocms-admin-style>=2.0,<3.0", "django-treebeard>=4.0,<5.0"], "cms-master": [ "https://github.com/divio/djangocms-admin-style/archive/master.zip?{bust}".format(**bust), "django-treebeard>=4.0,<5.0", ], "plugins-3.7": [ - "djangocms-text-ckeditor>=3.7,<4.0", - "djangocms-link>=2.5,<2.7", - "djangocms-icon>=1.4,<1.6", - "djangocms-style>=2.2,<2.4", - "djangocms-googlemap>=1.3,<1.5", - "djangocms-snippet>=2.2,<2.4", - "djangocms-video>=2.1,<2.4", - "djangocms-file>=2.3,<2.5", - "djangocms-picture>=2.3,<2.5", - "djangocms-bootstrap4>=1.5,<1.7", + "djangocms-text-ckeditor>=4.0,<5.0", + "djangocms-link>=3.0,<4.0", + "djangocms-icon>=2.0,<3.0", + "djangocms-style>=3.0,<4.0", + "djangocms-googlemap>=2.0,<3.0", + "djangocms-video>=3.0,<4.0", + "djangocms-file>=3.0,<4.0", + "djangocms-picture>=3.0,<4.0", + "djangocms-bootstrap4>=2.0,<3.0", + ], + "plugins-3.8": [ + "djangocms-text-ckeditor>=4.0,<5.0", + "djangocms-link>=3.0,<4.0", + "djangocms-icon>=2.0,<3.0", + "djangocms-style>=3.0,<4.0", + "djangocms-googlemap>=2.0,<3.0", + "djangocms-video>=3.0,<4.0", + "djangocms-file>=3.0,<4.0", + "djangocms-picture>=3.0,<4.0", + "djangocms-bootstrap4>=2.0,<3.0", ], "plugins-master": [ "https://github.com/divio/djangocms-text-ckeditor/archive/master.zip?{bust}" "".format(**bust), @@ -130,7 +139,6 @@ * djangocms-file (File plugin) * djangocms-picture (Image plugin) * djangocms-style (Style plugin) - * djangocms-snippet (Snippet plugin) * djangocms-googlemap (GoogleMap plugin) * djangocms-video (Video plugin) """ diff --git a/djangocms_installer/config/settings.py b/djangocms_installer/config/settings.py index 658be1e6..e4d3a5f4 100644 --- a/djangocms_installer/config/settings.py +++ b/djangocms_installer/config/settings.py @@ -79,7 +79,6 @@ "djangocms_link", "djangocms_picture", "djangocms_style", - "djangocms_snippet", "djangocms_googlemap", "djangocms_video", ) diff --git a/docs/libraries.rst b/docs/libraries.rst index a7d4241b..a51d5fcf 100644 --- a/docs/libraries.rst +++ b/docs/libraries.rst @@ -17,8 +17,8 @@ Libraries you would want to check: The actual package name may vary depending on the platform / distribution you are using; you should make sure you have the library headers file installed -(mostly contained in package with `-dev` in its name: e.g. `libjpeg-dev` for -`libjpeg` library). +(mostly contained in package with ``-dev`` in its name: e.g. ``libjpeg-dev`` for +``libjpeg`` library). Examples ^^^^^^^^ diff --git a/docs/reference.rst b/docs/reference.rst index ccdd2534..2466468d 100644 --- a/docs/reference.rst +++ b/docs/reference.rst @@ -50,7 +50,7 @@ The following arguments can be overridden in :ref:`wizard_mode` .. note:: Django ``stable`` keyword is expanded to latest released Django version supported by django CMS .. note:: Django ``lts`` keyword is expanded to latest released Django LTS supported by django CMS .. note:: django-cms ``stable`` keyword is expanded to latest released django-cms version -.. note:: django-cms ``lts`` keyword is expanded to latest released django-cms LTS version +.. note:: django-cms ``lts`` keyword is expanded to latest released django-cms LTS version, or latest stable if LTS is not supported .. warning:: if an unsupported combination of Django and django CMS version is selected, the wizard exits reporting the error. diff --git a/setup.cfg b/setup.cfg index 4b8e093d..ae105c7a 100644 --- a/setup.cfg +++ b/setup.cfg @@ -48,6 +48,7 @@ classifiers = Framework :: Django, Framework :: Django :: 2.2, Framework :: Django :: 3.0, + Framework :: Django :: 3.1, Topic :: Software Development [options] diff --git a/tests/base.py b/tests/base.py index 180ee5c4..96a773aa 100644 --- a/tests/base.py +++ b/tests/base.py @@ -123,8 +123,8 @@ def get_stable_django(latest=False, lts=False): :param lts: Latest lts version """ if latest and not sys.version_info < (3, 6) and not lts: - dj_ver = "3.0" - match = "Django<3.1" + dj_ver = "3.1" + match = "Django<3.2" else: dj_ver = "2.2" match = "Django<2.3" @@ -137,6 +137,6 @@ def get_stable_djangocms(): Takes into account arguments and python version. """ - dj_ver = "3.7" - match = "django-cms<3.8" + dj_ver = "3.8" + match = "django-cms<3.9" return dj_ver, match diff --git a/tests/config.py b/tests/config.py index 3a27e85e..7638c2f1 100644 --- a/tests/config.py +++ b/tests/config.py @@ -26,7 +26,7 @@ def test_default_config(self): self.assertEqual(conf_data.project_name, "example_prj") - self.assertEqual(conf_data.cms_version, "3.7") + self.assertEqual(conf_data.cms_version, "3.8") self.assertEqual(conf_data.django_version, dj_version) self.assertEqual(conf_data.i18n, "yes") self.assertEqual(conf_data.reversion, "yes") @@ -361,17 +361,15 @@ def test_latest_version(self): self.assertEqual(less_than_version("3"), "3.1") self.assertEqual(less_than_version("3.0.1"), "3.1.1") - @unittest.skipIf(sys.version_info[0] < 3, reason="django 2+ only supports python 3") def test_supported_versions(self): dj_version, dj_match = get_stable_django(latest=True) - self.assertEqual(supported_versions("stable", "stable"), (dj_version, "3.7")) + self.assertEqual(supported_versions("stable", "stable"), (dj_version, "3.8")) self.assertEqual(supported_versions("stable", "3.1.10"), (dj_version, None)) - self.assertEqual(supported_versions("stable", "rc"), (dj_version, data.DJANGOCMS_RC)) self.assertEqual(supported_versions("stable", "beta"), (dj_version, data.DJANGOCMS_BETA)) self.assertEqual(supported_versions("stable", "develop"), (dj_version, data.DJANGOCMS_DEVELOP)) - self.assertEqual(supported_versions("lts", "rc"), ("2.2", data.DJANGOCMS_RC)) - self.assertEqual(supported_versions("lts", "lts"), ("2.2", "3.7")) + self.assertEqual(supported_versions("lts", "stable"), ("2.2", "3.8")) + self.assertEqual(supported_versions("lts", "lts"), ("2.2", "3.8")) with self.assertRaises(RuntimeError): supported_versions("stable", "2.4"), ("1.5", "2.4") @@ -405,8 +403,8 @@ def test_requirements(self): self.assertTrue(conf_data.requirements.find(config.data.DJANGOCMS_37) > -1) self.assertTrue(conf_data.requirements.find(dj_match) > -1) self.assertFalse(conf_data.requirements.find("django-reversion") > -1) - self.assertTrue(conf_data.requirements.find("djangocms-text-ckeditor>=3.7,<4.0") > -1) - self.assertTrue(conf_data.requirements.find("djangocms-admin-style>=1.5") > -1) + self.assertTrue(conf_data.requirements.find("djangocms-text-ckeditor>=4.0") > -1) + self.assertTrue(conf_data.requirements.find("djangocms-admin-style>=2.0") > -1) self.assertTrue(conf_data.requirements.find("django-filer") > -1) self.assertTrue(conf_data.requirements.find("cmsplugin-filer") == -1) self.assertTrue(conf_data.requirements.find("djangocms-file") > -1) @@ -427,12 +425,12 @@ def test_requirements(self): ] ) - self.assertTrue(conf_data.requirements.find(config.data.DJANGOCMS_37) > -1) + self.assertTrue(conf_data.requirements.find(config.data.DJANGOCMS_38) > -1) self.assertTrue(conf_data.requirements.find(dj_match) > -1) self.assertFalse(conf_data.requirements.find("django-reversion") > -1) self.assertTrue(conf_data.requirements.find("cmsplugin-filer") == -1) self.assertTrue(conf_data.requirements.find("djangocms-admin-style") > -1) - self.assertTrue(conf_data.requirements.find("djangocms-text-ckeditor>=3.7,<4.0") > -1) + self.assertTrue(conf_data.requirements.find("djangocms-text-ckeditor>=4.0") > -1) self.assertTrue(conf_data.requirements.find("djangocms-bootstrap4") > -1) self.assertTrue(conf_data.requirements.find("djangocms-file") > -1) self.assertTrue(conf_data.requirements.find("djangocms-flash") == -1) @@ -562,7 +560,7 @@ def test_requirements(self): self.assertTrue(conf_data.requirements.find(config.data.DJANGOCMS_37) > -1) self.assertTrue(conf_data.requirements.find(dj_match) > -1) self.assertFalse(conf_data.requirements.find("django-reversion") > -1) - self.assertTrue(conf_data.requirements.find("djangocms-text-ckeditor>=3.7") > -1) + self.assertTrue(conf_data.requirements.find("djangocms-text-ckeditor>=4.0") > -1) self.assertTrue(conf_data.requirements.find("djangocms-admin-style") > -1) self.assertTrue(conf_data.requirements.find("pytz") > -1) @@ -585,7 +583,7 @@ def test_requirements(self): self.assertTrue(conf_data.requirements.find(config.data.DJANGOCMS_37) > -1) self.assertTrue(conf_data.requirements.find(dj_match) > -1) self.assertFalse(conf_data.requirements.find("django-reversion") > -1) - self.assertTrue(conf_data.requirements.find("djangocms-text-ckeditor>=3.7") > -1) + self.assertTrue(conf_data.requirements.find("djangocms-text-ckeditor>=4.0") > -1) self.assertTrue(conf_data.requirements.find("djangocms-admin-style") > -1) self.assertTrue(conf_data.requirements.find("pytz") > -1) @@ -672,20 +670,17 @@ def test_requirements(self): "-p" + self.project_dir, "example_prj", ] - if sys.version_info < (3, 5,): - with self.assertRaises(SystemExit): - conf_data = config.parse(requirements_21) - else: - conf_data = config.parse(requirements_21) - - self.assertTrue(conf_data.requirements.find(config.data.DJANGOCMS_DEVELOP) > -1) - self.assertTrue(conf_data.requirements.find(dj_match) > -1) - self.assertFalse(conf_data.requirements.find("django-reversion") > -1) - self.assertTrue(conf_data.requirements.find("djangocms-text-ckeditor") == -1) - self.assertTrue(conf_data.requirements.find("djangocms-admin-style/archive/master.zip") > -1) - self.assertTrue(conf_data.requirements.find("djangocms-teaser/archive/master.zip") == -1) - self.assertTrue(conf_data.requirements.find("south") == -1) - self.assertTrue(conf_data.requirements.find("psycopg2") > -1) + + conf_data = config.parse(requirements_21) + + self.assertTrue(conf_data.requirements.find(config.data.DJANGOCMS_DEVELOP) > -1) + self.assertTrue(conf_data.requirements.find(dj_match) > -1) + self.assertFalse(conf_data.requirements.find("django-reversion") > -1) + self.assertTrue(conf_data.requirements.find("djangocms-text-ckeditor") == -1) + self.assertTrue(conf_data.requirements.find("djangocms-admin-style/archive/master.zip") > -1) + self.assertTrue(conf_data.requirements.find("djangocms-teaser/archive/master.zip") == -1) + self.assertTrue(conf_data.requirements.find("south") == -1) + self.assertTrue(conf_data.requirements.find("psycopg2") > -1) dj_version, dj_match = get_stable_django(lts=True) conf_data = config.parse( @@ -699,7 +694,7 @@ def test_requirements(self): ] ) - self.assertTrue(conf_data.requirements.find(config.data.DJANGOCMS_37) > -1) + self.assertTrue(conf_data.requirements.find(config.data.DJANGOCMS_38) > -1) self.assertTrue(conf_data.requirements.find(dj_match) > -1) dj_version, dj_match = get_stable_django(latest=True) @@ -714,7 +709,7 @@ def test_requirements(self): ] ) - self.assertTrue(conf_data.requirements.find(config.data.DJANGOCMS_37) > -1) + self.assertTrue(conf_data.requirements.find(config.data.DJANGOCMS_38) > -1) self.assertTrue(conf_data.requirements.find(dj_match) > -1) def test_bootstrap(self): @@ -930,7 +925,6 @@ def unused(self, config_data): if hasattr(config_data, "requirements"): delattr(config_data, "requirements") - @unittest.skipIf(sys.version_info[0] < 3, reason="django 2+ only supports python 3") def test_parse_config_file(self, *args): """Tests .config.__init__._parse_config_file function.""" dj_version, __ = get_stable_django(latest=True) @@ -955,14 +949,14 @@ def test_parse_config_file(self, *args): ("django_version", dj_lts_version), ), ), - ("config-03.ini", None, (("cms_version", "3.7"), ("i18n", "no"), ("django_version", dj_version),)), - ("config-04.ini", None, (("cms_version", "3.7"), ("use_timezone", "no"))), - ("config-05.ini", None, (("cms_version", "3.7"), ("timezone", "Europe/London"))), - ("config-06.ini", None, (("cms_version", "3.7"), ("reversion", "no"))), + ("config-03.ini", None, (("cms_version", "3.8"), ("i18n", "no"), ("django_version", dj_version),)), + ("config-04.ini", None, (("cms_version", "3.8"), ("use_timezone", "no"))), + ("config-05.ini", None, (("cms_version", "3.8"), ("timezone", "Europe/London"))), + ("config-06.ini", None, (("cms_version", "3.8"), ("reversion", "no"))), ( "config-07.ini", None, - (("cms_version", "3.7"), ("permissions", "no"), ("django_version", dj_lts_version)), + (("cms_version", "3.8"), ("permissions", "no"), ("django_version", dj_lts_version)), ), ( "config-08.ini", @@ -973,14 +967,14 @@ def test_parse_config_file(self, *args): "config-09.ini", None, ( - ("cms_version", "3.7"), + ("cms_version", "3.8"), ("i18n", "yes"), ("languages", ["en", "ru"]), ("django_version", dj_lts_version), ), ), ("config-10.ini", "django_version", dj_lts_version), - ("config-11.ini", "project_directory", "/test/me"), + ("config-11.ini", None, (("project_directory", "/test/me"), ("cms_version", "3.7"))), ("config-12.ini", None, (("bootstrap", True), ("django_version", dj_lts_version))), ("config-13.ini", "templates", "."), ("config-14.ini", "starting_page", True), diff --git a/tests/django.py b/tests/django.py index dee6b286..c6a2048e 100644 --- a/tests/django.py +++ b/tests/django.py @@ -256,19 +256,13 @@ def test_patch_django_22_37(self): self.assertEqual(len(re.findall("MEDIA_ROOT =", settings)), 1) self.assertEqual(len(re.findall("STATICFILES_DIRS", settings)), 1) - @unittest.skipIf( - sys.version_info[:2] not in ((3, 6), (3, 7), (3, 8),), - reason="django 3.0 only supports python 3.6, 3.7 and 3.8", - ) def test_patch_django_30_develop(self): - dj_version, dj_match = get_stable_django(latest=True) - extra_path = os.path.join(os.path.dirname(__file__), "data", "extra_settings.py") params = [ "--db=sqlite://localhost/test.db", "--lang=en", "--extra-settings=%s" % extra_path, - "--django-version=%s" % dj_version, + "--django-version=3.0", "-f", "--cms-version=develop", "--timezone=Europe/Moscow", @@ -294,7 +288,7 @@ def test_patch_django_30_develop(self): self.assertFalse(getattr(project.settings, "TEMPLATES_DIR", False)) self.assertTrue(config.get_settings().APPHOOK_RELOAD_MIDDLEWARE_CLASS in project.settings.MIDDLEWARE) - def test_patch_django_22_rc(self): + def test_patch_django_22_38(self): dj_version, dj_match = get_stable_django(lts=True) extra_path = os.path.join(os.path.dirname(__file__), "data", "extra_settings.py") @@ -304,14 +298,48 @@ def test_patch_django_22_rc(self): "--extra-settings=%s" % extra_path, "--django-version=%s" % dj_version, "-f", - "--cms-version=rc", + "--cms-version=3.8", + "--timezone=Europe/Moscow", + "-q", + "-u", + "-zno", + "--i18n=no", + "-p" + self.project_dir, + "test_patch_django_22_38", + ] + config_data = config.parse(params) + install.requirements(config_data.requirements) + django.create_project(config_data) + django.patch_settings(config_data) + django.copy_files(config_data) + # settings is importable even in non django environment + sys.path.append(config_data.project_directory) + + project = __import__(config_data.project_name, globals(), locals(), ["settings"]) + + # checking for django options + self.assertTrue(project.settings.TEMPLATES) + self.assertFalse(getattr(project.settings, "TEMPLATES_DIR", False)) + self.assertTrue(config.get_settings().APPHOOK_RELOAD_MIDDLEWARE_CLASS in project.settings.MIDDLEWARE) + + def test_patch_django_31_38(self): + dj_version, dj_match = get_stable_django(lts=True) + + extra_path = os.path.join(os.path.dirname(__file__), "data", "extra_settings.py") + params = [ + "--db=sqlite://localhost/test.db", + "--lang=en", + "--extra-settings=%s" % extra_path, + "--django-version=3.1", + "-f", + "--cms-version=3.8", "--timezone=Europe/Moscow", "-q", "-u", "-zno", "--i18n=no", "-p" + self.project_dir, - "test_patch_django_22_rc", + "test_patch_django_22_38", ] config_data = config.parse(params) install.requirements(config_data.requirements) diff --git a/tests/fixtures/configs/config-01.ini b/tests/fixtures/configs/config-01.ini index 6f8768e5..6cc3f714 100644 --- a/tests/fixtures/configs/config-01.ini +++ b/tests/fixtures/configs/config-01.ini @@ -7,7 +7,7 @@ reversion = yes permissions = yes languages = django-version = stable -cms-version = 3.7 +cms-version = 3.8 parent-dir = . bootstrap = no templates = no diff --git a/tests/main.py b/tests/main.py index d1f9160f..c197c783 100644 --- a/tests/main.py +++ b/tests/main.py @@ -41,7 +41,6 @@ def test_requirements_invocation(self): self.assertTrue(stdout.find("djangocms-link") > -1) self.assertTrue(stdout.find("djangocms-picture") > -1) self.assertTrue(stdout.find("djangocms-style") > -1) - self.assertTrue(stdout.find("djangocms-snippet") > -1) self.assertTrue(stdout.find("cmsplugin-filer") == -1) self.assertTrue(stdout.find("djangocms-teaser") == -1) self.assertTrue(stdout.find("djangocms-video") > -1)