Skip to content

Commit

Permalink
Merge branch 'fix/remove_get_abs_url' of github.com:fsbraun/djangocms…
Browse files Browse the repository at this point in the history
…-alias into fix/remove_get_abs_url

# Conflicts:
#	tests/test_admin.py
  • Loading branch information
fsbraun committed Nov 12, 2023
2 parents 6a26f16 + 6622478 commit d8248cf
Show file tree
Hide file tree
Showing 7 changed files with 37 additions and 6 deletions.
31 changes: 31 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -75,3 +75,34 @@ jobs:
with:
name: html-report
path: htmlcov

unit-tests-django-main:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
python-version: ['3.11']
requirements-file: [
'py311-djmain-cms41-default.txt',
'py311-djmain-cms41-versioning.txt',
]
os: [
ubuntu-20.04,
]

steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}

uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r tests/requirements/${{ matrix.requirements-file }}
python setup.py install
- name: Run coverage
run: coverage run setup.py test
continue-on-error: true
2 changes: 1 addition & 1 deletion djangocms_alias/cms_plugins.py
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
from copy import copy

from cms.toolbar.utils import get_object_edit_url
from django.utils.translation import (
get_language_from_request,
gettext_lazy as _,
)

from cms.plugin_base import CMSPluginBase, PluginMenuItem
from cms.plugin_pool import plugin_pool
from cms.toolbar.utils import get_object_edit_url
from cms.utils.permissions import (
get_model_permission_codename,
has_plugin_permission,
Expand Down
2 changes: 1 addition & 1 deletion djangocms_alias/cms_toolbars.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import itertools
from copy import copy

from cms.toolbar.utils import get_object_edit_url
from django.urls import NoReverseMatch
from django.utils.encoding import force_str
from django.utils.http import urlencode
Expand All @@ -18,6 +17,7 @@
SHORTCUTS_BREAK,
)
from cms.toolbar.items import Break, ButtonList
from cms.toolbar.utils import get_object_edit_url
from cms.toolbar_base import CMSToolbar
from cms.toolbar_pool import toolbar_pool
from cms.utils.i18n import (
Expand Down
2 changes: 1 addition & 1 deletion djangocms_alias/internal_search.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from django.template import RequestContext
from django.utils.translation import gettext_lazy as _

from cms.toolbar.utils import get_toolbar_from_request, get_object_preview_url
from cms.toolbar.utils import get_object_preview_url, get_toolbar_from_request

from djangocms_internalsearch.base import BaseSearchConfig
from djangocms_internalsearch.helpers import get_request, get_version_object
Expand Down
2 changes: 1 addition & 1 deletion tests/test_admin.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
from unittest import skipUnless

from cms.toolbar.utils import get_object_preview_url
from django.contrib.auth.models import Permission
from django.urls import reverse
from django.utils.formats import localize
from django.utils.timezone import localtime

from cms.api import add_plugin
from cms.toolbar.utils import get_object_preview_url
from cms.utils.i18n import force_language
from cms.utils.urlutils import add_url_parameters, admin_reverse

Expand Down
2 changes: 1 addition & 1 deletion tests/test_views.py
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
import re
from unittest import skip, skipIf, skipUnless

from cms.toolbar.utils import get_object_edit_url
from django.contrib.auth.models import Permission
from django.contrib.contenttypes.models import ContentType
from django.contrib.sites.models import Site
from django.test.utils import override_settings

from cms.api import add_plugin
from cms.models import Placeholder
from cms.toolbar.utils import get_object_edit_url
from cms.utils import get_current_site
from cms.utils.i18n import force_language
from cms.utils.plugins import downcast_plugins
Expand Down
2 changes: 1 addition & 1 deletion tests/test_wizards.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from cms.toolbar.utils import get_object_edit_url
from django.contrib.sites.models import Site
from django.utils import translation

from cms.toolbar.utils import get_object_edit_url
from cms.utils import get_current_site
from cms.wizards.forms import WizardStep2BaseForm, step2_form_factory
from cms.wizards.helpers import get_entries as get_wizard_entires
Expand Down

0 comments on commit d8248cf

Please sign in to comment.