Skip to content

Commit

Permalink
Update test requirements
Browse files Browse the repository at this point in the history
  • Loading branch information
fsbraun committed Jul 29, 2024
1 parent 9b74e5c commit 0d5cd46
Show file tree
Hide file tree
Showing 6 changed files with 19 additions and 19 deletions.
18 changes: 9 additions & 9 deletions djangocms_versioning/test_utils/test_helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,17 +33,17 @@ def get_toolbar(content_obj, user=None, **kwargs):
toolbar.toolbar.set_object(content_obj)
# Set the toolbar mode
if kwargs.get("edit_mode", False):
toolbar.toolbar.edit_mode_active = True
toolbar.toolbar.preview_mode_active = False
toolbar.toolbar.structure_mode_active = False
toolbar.toolbar.__dict__["edit_mode_active"] = True
toolbar.toolbar.__dict__["preview_mode_active"] = False
toolbar.toolbar.__dict__["structure_mode_active"] = False
elif kwargs.get("preview_mode", False):
toolbar.toolbar.edit_mode_active = False
toolbar.toolbar.preview_mode_active = True
toolbar.toolbar.structure_mode_active = False
toolbar.toolbar.__dict__["edit_mode_active"] = False
toolbar.toolbar.__dict__["preview_mode_active"] = True
toolbar.toolbar.__dict__["structure_mode_active"] = False
elif kwargs.get("structure_mode", False):
toolbar.toolbar.edit_mode_active = False
toolbar.toolbar.preview_mode_active = False
toolbar.toolbar.structure_mode_active = True
toolbar.toolbar.__dict__["edit_mode_active"] = False
toolbar.toolbar.__dict__["preview_mode_active"] = False
toolbar.toolbar.__dict__["structure_mode_active"] = True
toolbar.populate()
return toolbar

Expand Down
2 changes: 1 addition & 1 deletion tests/requirements/dj32_cms41.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
-r requirements_base.txt

django-cms>=4.1.0rc2
django-cms>=4.1,<4.2

Django>=3.2,<4.0
django-classy-tags
Expand Down
2 changes: 1 addition & 1 deletion tests/requirements/dj40_cms41.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
-r requirements_base.txt

django-cms>=4.1.0rc2
django-cms>=4.1,<4.2

Django>=4.0,<4.1
django-classy-tags
Expand Down
2 changes: 1 addition & 1 deletion tests/requirements/dj41_cms41.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
-r requirements_base.txt

django-cms>=4.1.0rc2
django-cms>=4.1,<4.2

Django>=4.1,<4.2
django-classy-tags
Expand Down
2 changes: 1 addition & 1 deletion tests/requirements/dj42_cms41.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
-r requirements_base.txt

django-cms>=4.1.0rc2
django-cms>=4.1,<4.2

Django>=4.2,<5
django-classy-tags
Expand Down
12 changes: 6 additions & 6 deletions tests/test_menus.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,14 +57,14 @@ def _render_menu(self, user=None, **kwargs):
toolbar = CMSToolbar(request)

if kwargs.get("edit_mode", False):
toolbar.edit_mode_active = True
toolbar.preview_mode_active = False
toolbar.__dict__["edit_mode_active"] = True
toolbar.__dict__["preview_mode_active"] = False
elif kwargs.get("preview_mode", False):
toolbar.edit_mode_active = False
toolbar.preview_mode_active = True
toolbar.__dict__["edit_mode_active"] = False
toolbar.__dict__["preview_mode_active"] = True
else:
toolbar.edit_mode_active = False
toolbar.preview_mode_active = False
toolbar.__dict__["edit_mode_active"] = False
toolbar.__dict__["preview_mode_active"] = False

request.toolbar = toolbar
context = {"request": request}
Expand Down

0 comments on commit 0d5cd46

Please sign in to comment.