Skip to content

Commit

Permalink
Make tests working again
Browse files Browse the repository at this point in the history
  • Loading branch information
yakky committed Mar 5, 2019
1 parent 6a7937b commit d6d2036
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 17 deletions.
6 changes: 2 additions & 4 deletions djangocms_page_meta/cms_toolbars.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,8 @@ def populate(self):
else:
has_global_current_page_change_permission = False
# check if user has page edit permission
can_change = (
self.request.current_page and
self.request.current_page.has_change_permission(self.request.user)
)
permission = self.request.current_page.has_change_permission(self.request.user)
can_change = self.request.current_page and permission
if has_global_current_page_change_permission or can_change:
not_edit_mode = not self.toolbar.edit_mode
current_page_menu = self.toolbar.get_or_create_menu('page')
Expand Down
4 changes: 1 addition & 3 deletions requirements-test.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,7 @@
coverage
coveralls
mock>=1.0.1
nose>=1.3.0
django-nose>=1.2
flake8
https://github.com/nephila/djangocms-page-tags/archive/develop.zip
https://github.com/nephila/djangocms-helper/archive/develop.zip
tox
djangocms-helper<1.1
20 changes: 10 additions & 10 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -5,25 +5,25 @@ envlist = docs,pep8,isort,py{36,35,34,27}-django{111,110,19,18}-cms{35,34}
commands = {env:COMMAND:python} setup.py test
deps =
django18: Django>=1.8,<1.9
django18: django-mptt>=0.8
django18: django-taggit>=0.18
django18: django-mptt>=0.8,<0.9
django18: django-taggit>=0.18,<0.22
django18: django-polymorphic<0.9
django19: Django>=1.9,<1.10
django19: django-mptt>=0.8
django19: django-taggit>=0.18
django19: django-mptt>=0.8,<0.9
django19: django-taggit>=0.18,<0.22
django19: django-polymorphic<0.9
django110: Django>=1.10,<1.11
django110: django-mptt>=0.8
django110: django-taggit>=0.18
django110: django-polymorphic>=0.9
django110: django-filer>=1.3
django110: django-mptt>=0.8,<0.9
django110: django-taggit>=0.18,<0.22
django110: django-polymorphic>=0.9,<2.0
django110: django-filer>=1.3,<1.4
django111: Django>=1.11,<2.0
django111: django-mptt>=0.8
django111: django-taggit>=0.18
django111: django-taggit>=0.18,<0.24
django111: django-polymorphic>=0.9
django111: django-filer>=1.3
cms34: https://github.com/divio/django-cms/archive/release/3.4.x.zip
cms35: https://github.com/divio/django-cms/archive/develop.zip
cms35: https://github.com/divio/django-cms/archive/release/3.5.x.zip
-r{toxinidir}/requirements-test.txt

[testenv:pep8]
Expand Down

0 comments on commit d6d2036

Please sign in to comment.