From 1ce0bef39d6d53b0be99ecf02770d5fd79f2bf7d Mon Sep 17 00:00:00 2001 From: Olivier Delaere <23073839+odelaere@users.noreply.github.com> Date: Thu, 20 Jan 2022 15:35:00 +0100 Subject: [PATCH 1/3] gha --- .coveragerc | 7 +-- .github/workflows/main.yml | 89 ++++++++++++++++++++++++++++++++++++++ .gitignore | 5 ++- .isort.cfg | 6 +++ buildout.cfg | 2 +- buildout.d/development.cfg | 8 +++- buildout.d/versions.cfg | 30 +++++-------- ci.cfg | 14 ++++++ requirements.txt | 6 ++- travis.cfg | 5 --- 10 files changed, 136 insertions(+), 36 deletions(-) create mode 100644 .github/workflows/main.yml create mode 100644 .isort.cfg create mode 100644 ci.cfg delete mode 100644 travis.cfg diff --git a/.coveragerc b/.coveragerc index 0e174f8..69fd459 100644 --- a/.coveragerc +++ b/.coveragerc @@ -1,9 +1,6 @@ [report] include = - src/collective/* + src/collective/eeafaceted/dashboard/* omit = */test* - src/collective/__init__.py - src/collective/eeafaceted/__init__.py - src/collective/eeafaceted/__init__.py - src/collective/eeafaceted/dashboard/__init__.py + */__init__.py diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml new file mode 100644 index 0000000..1ac66dc --- /dev/null +++ b/.github/workflows/main.yml @@ -0,0 +1,89 @@ +# This is a basic workflow to help you get started with Actions + +name: CI + +on: + push: + pull_request: + +jobs: + test: + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + include: + - python: 2.7 + plone: 4.3 + - python: 2.7 + plone: 5.1 + - python: 2.7 + plone: 5.2 + steps: + - name: Checkout + uses: actions/checkout@v2 + - name: Set up Python + uses: actions/setup-python@v2 + with: + python-version: ${{ matrix.python }} + - name: Setup Env + run: | + pip install -r requirements.txt coverage==5.3.1 + - name: Cache eggs + uses: actions/cache@v2 + env: + cache-name: cache-eggs + with: + path: ~/buildout-cache/eggs + key: ${{ runner.os }}-test-${{ env.cache-name }}-${{ matrix.plone }} + restore-keys: ${{ runner.os }}-test-${{ env.cache-name }}-${{ matrix.plone }} + - name: buildout + run: | + sed -ie "s#test-4.3#test-${{matrix.plone}}#" buildout.cfg + buildout -c ci.cfg annotate + buildout -c ci.cfg + - name: test + run: | + bin/test -t !robot + coverage: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v2 + - name: Set up Python 2.7 + uses: actions/setup-python@v2 + with: + python-version: 2.7 + - name: Setup Env + run: | + pip install -r requirements.txt coverage==5.3.1 + - name: Cache eggs + uses: actions/cache@v2 + env: + cache-name: cache-eggs + with: + path: ~/buildout-cache/eggs + key: ${{ runner.os }}-coverage-${{ env.cache-name }} + restore-keys: ${{ runner.os }}-coverage-${{ env.cache-name }} + - name: buildout + run: | + buildout -c ci.cfg + - name: code-analysis + run: | + bin/code-analysis + - name: test coverage + run: | + bin/coverage run bin/test -t !robot + - name: Set up Python 3.8 + uses: actions/setup-python@v2 + with: + python-version: 3.8 + - name: Install Coveralls + run: | + pip3 install -U pip setuptools --no-cache-dir + pip3 install -U "coveralls>=3.0.0" coverage==5.3.1 --no-cache-dir + - name: Publish to Coveralls + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: | + coveralls --service=github diff --git a/.gitignore b/.gitignore index 5e40286..566b9aa 100644 --- a/.gitignore +++ b/.gitignore @@ -8,7 +8,6 @@ *.egg-info *.EGG-INFO *.log -.*.cfg .coverage bin/ build/ @@ -25,3 +24,7 @@ var/ src/* !src/collective pip-selfcheck.json +.idea +pyvenv.cfg +.installed.cfg +.mr.developer.cfg \ No newline at end of file diff --git a/.isort.cfg b/.isort.cfg new file mode 100644 index 0000000..edae036 --- /dev/null +++ b/.isort.cfg @@ -0,0 +1,6 @@ +[settings] +force_alphabetical_sort = True +force_single_line = True +lines_after_imports = 2 +line_length = 200 +not_skip = __init__.py \ No newline at end of file diff --git a/buildout.cfg b/buildout.cfg index 6a10de2..cfbf701 100644 --- a/buildout.cfg +++ b/buildout.cfg @@ -1,4 +1,4 @@ [buildout] extends = - https://raw.github.com/collective/buildout.plonetest/master/plone-4.x.cfg + https://raw.github.com/collective/buildout.plonetest/master/test-4.x.cfg buildout.d/development.cfg diff --git a/buildout.d/development.cfg b/buildout.d/development.cfg index a3df0e3..24dfc36 100644 --- a/buildout.d/development.cfg +++ b/buildout.d/development.cfg @@ -43,6 +43,10 @@ eggs = [code-analysis] recipe = plone.recipe.codeanalysis -directory = src/collective -flake8-ignore = E123,E124,E501,E126,E127,E128,W504,W391 +pre-commit-hook = True +return-status-codes = True +directory = ${buildout:directory}/src/collective/eeafaceted/dashboard +flake8-ignore = E123,E124,E501,E126,E127,E128,W391,C901 +flake8-extensions = + flake8-isort diff --git a/buildout.d/versions.cfg b/buildout.d/versions.cfg index c813bb3..487990e 100644 --- a/buildout.d/versions.cfg +++ b/buildout.d/versions.cfg @@ -1,22 +1,12 @@ [versions] -setuptools=41.2.0 -zc.buildout=2.13.2 - -future = +setuptools = 44.1.1 +zc.buildout = 2.13.3 +# python 2 ... +traitlets = 4.3.2 +future = 0.18.2 +# misc +zc.lockfile = 2.0 +coverage = 5.3.1 +toml = 0.10.2 zope.configuration=3.8.1 -z3c.unconfigure=1.1 -plone.formwidget.namedfile=2.0.2 -pycodestyle= - -# python 2 compatibility -soupsieve=1.9.6 - -# fix to avoid use of wxPython -robotframework-ride = 1.5.2.1 - -traitlets = 4.3.3 - -# Required by: -# collective.fingerpointing -zc.lockfile = 1.2.1 -file-read-backwards = 1.2.2 +plone.formwidget.namedfile = 2.0.6 \ No newline at end of file diff --git a/ci.cfg b/ci.cfg new file mode 100644 index 0000000..c3781f9 --- /dev/null +++ b/ci.cfg @@ -0,0 +1,14 @@ +[buildout] +extends = + buildout.cfg +eggs-directory = ~/buildout-cache/eggs + +parts += + createcoverage + +[createcoverage] +recipe = zc.recipe.egg +eggs = createcoverage + +[versions] +coverage = 5.3.1 \ No newline at end of file diff --git a/requirements.txt b/requirements.txt index cde70a3..edde950 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,2 +1,4 @@ -setuptools==41.2.0 -zc.buildout==2.13.2 +pip==20.3.4 +setuptools==44.1.1 +zc.buildout==2.13.3 +wheel \ No newline at end of file diff --git a/travis.cfg b/travis.cfg deleted file mode 100644 index d4427c1..0000000 --- a/travis.cfg +++ /dev/null @@ -1,5 +0,0 @@ -[buildout] -extends = - https://raw.github.com/collective/buildout.plonetest/master/test-5.1.x.cfg - buildout.d/development.cfg - From 8e62a1d089166ae34a4db0bed5f533cf39ac5234 Mon Sep 17 00:00:00 2001 From: Olivier Delaere <23073839+odelaere@users.noreply.github.com> Date: Thu, 20 Jan 2022 15:58:52 +0100 Subject: [PATCH 2/3] Fix code-analysis --- .travis.yml | 62 ------------------- buildout.d/development.cfg | 2 +- .../eeafaceted/dashboard/__init__.py | 1 + .../browser/facetedcollectionportlet.py | 23 ++++--- .../eeafaceted/dashboard/browser/overrides.py | 3 +- .../dashboard/content/pod_template.py | 5 +- .../eeafaceted/dashboard/testing.py | 5 +- .../tests/test_dashboardcollection.py | 2 +- .../tests/test_documentgeneration.py | 9 +-- .../dashboard/tests/test_pod_template.py | 4 +- .../dashboard/tests/test_portlet.py | 17 ++--- .../eeafaceted/dashboard/tests/test_robot.py | 8 +-- .../eeafaceted/dashboard/tests/test_views.py | 7 +-- .../dashboard/tests/test_vocabulary.py | 8 +-- 14 files changed, 45 insertions(+), 111 deletions(-) delete mode 100644 .travis.yml diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 18be8de..0000000 --- a/.travis.yml +++ /dev/null @@ -1,62 +0,0 @@ -os: - - linux - -dist: bionic - -language: python - -addons: - apt: - packages: - - libgtk-3-dev - -cache: - directories: - - eggs - - downloads - -python: - - 2.7 - -env: - - PLONE_VERSION=4 - - PLONE_VERSION=5.0 - - PLONE_VERSION=5.1 - - PLONE_VERSION=5.2 - -jobs: - fast_finish: true - include: - - python: "2.7" - env: PLONE_VERSION=4 - - python: "2.7" - env: PLONE_VERSION=5.0 - - python: "2.7" - env: PLONE_VERSION=5.1 - - python: "2.7" - env: PLONE_VERSION=5.2 - allow_failures: - - python: "2.7" - env: PLONE_VERSION=5.2 - -install: - - sed -ie "s#test-5.1#test-$PLONE_VERSION#" travis.cfg - - virtualenv . - - bin/pip install -r requirements.txt - - mkdir -p buildout-cache/{eggs,downloads} - - bin/buildout -c travis.cfg buildout:download-cache=downloads buildout:eggs-directory=eggs annotate - - bin/buildout -c travis.cfg buildout:download-cache=downloads buildout:eggs-directory=eggs - -script: - - bin/test --test=\!"robot" - -after_success: - - bin/coverage run bin/test --test=\!"robot" - - pip install coverage==4.5.4 - - python -m coverage.pickle2json - - pip install coveralls - - coveralls - -notifications: - email: - - devs@imio.be diff --git a/buildout.d/development.cfg b/buildout.d/development.cfg index 24dfc36..55f994f 100644 --- a/buildout.d/development.cfg +++ b/buildout.d/development.cfg @@ -46,7 +46,7 @@ recipe = plone.recipe.codeanalysis pre-commit-hook = True return-status-codes = True directory = ${buildout:directory}/src/collective/eeafaceted/dashboard -flake8-ignore = E123,E124,E501,E126,E127,E128,W391,C901 +flake8-ignore = E123,E124,E501,E126,E127,E128,W391,C901,W504 flake8-extensions = flake8-isort diff --git a/src/collective/eeafaceted/dashboard/__init__.py b/src/collective/eeafaceted/dashboard/__init__.py index 5f5fcfc..bc2ec4a 100644 --- a/src/collective/eeafaceted/dashboard/__init__.py +++ b/src/collective/eeafaceted/dashboard/__init__.py @@ -3,4 +3,5 @@ from zope.i18nmessageid import MessageFactory + FacetedDashboardMessageFactory = MessageFactory('collective.eeafaceted.dashboard') diff --git a/src/collective/eeafaceted/dashboard/browser/facetedcollectionportlet.py b/src/collective/eeafaceted/dashboard/browser/facetedcollectionportlet.py index 04122de..7b832e3 100644 --- a/src/collective/eeafaceted/dashboard/browser/facetedcollectionportlet.py +++ b/src/collective/eeafaceted/dashboard/browser/facetedcollectionportlet.py @@ -1,22 +1,21 @@ # encoding: utf-8 -from Acquisition import aq_inner, aq_parent - -from zope.interface import implements -from plone.portlets.interfaces import IPortletDataProvider -from plone.app.portlets.portlets import base - -from Products.CMFPlone.utils import base_hasattr -from Products.CMFPlone.utils import getFSVersionTuple -from Products.Five.browser.pagetemplatefile import ViewPageTemplateFile -from eea.facetednavigation.criteria.interfaces import ICriteria -from eea.facetednavigation.subtypes.interfaces import IFacetedNavigable +from Acquisition import aq_inner +from Acquisition import aq_parent from collective.eeafaceted.collectionwidget.interfaces import NoFacetedViewDefinedException from collective.eeafaceted.collectionwidget.utils import getCollectionLinkCriterion from collective.eeafaceted.collectionwidget.widgets.widget import CollectionWidget - from collective.eeafaceted.dashboard import FacetedDashboardMessageFactory as _ from collective.eeafaceted.dashboard.config import DEFAULT_PORTLET_TITLE +from eea.facetednavigation.criteria.interfaces import ICriteria +from eea.facetednavigation.subtypes.interfaces import IFacetedNavigable +from plone.app.portlets.portlets import base +from plone.portlets.interfaces import IPortletDataProvider +from Products.CMFPlone.utils import base_hasattr +from Products.CMFPlone.utils import getFSVersionTuple +from Products.Five.browser.pagetemplatefile import ViewPageTemplateFile +from zope.interface import implements + # in Plone5, portlet form is a z3c.form, in Plone4 it uses formlib HAS_PLONE5 = bool(getFSVersionTuple()[0] >= 5) diff --git a/src/collective/eeafaceted/dashboard/browser/overrides.py b/src/collective/eeafaceted/dashboard/browser/overrides.py index 8683c67..4998040 100644 --- a/src/collective/eeafaceted/dashboard/browser/overrides.py +++ b/src/collective/eeafaceted/dashboard/browser/overrides.py @@ -4,15 +4,16 @@ from collective.eeafaceted.collectionwidget.interfaces import NotDashboardContextException from collective.eeafaceted.collectionwidget.utils import getCollectionLinkCriterion from collective.eeafaceted.collectionwidget.utils import getCurrentCollection +from collective.eeafaceted.dashboard import FacetedDashboardMessageFactory as _ from collective.eeafaceted.dashboard.interfaces import IDashboardGenerablePODTemplates from collective.eeafaceted.dashboard.utils import getDashboardQueryResult from collective.eeafaceted.z3ctable.browser.views import FacetedTableView -from collective.eeafaceted.dashboard import FacetedDashboardMessageFactory as _ from eea.facetednavigation.interfaces import IFacetedNavigable from plone.app.contenttypes.interfaces import ICollection from plone.memoize.view import memoize from zope.component import getAdapter + # necessary for now for elements using ICollection from plone.app.collection HAS_PAC = True try: diff --git a/src/collective/eeafaceted/dashboard/content/pod_template.py b/src/collective/eeafaceted/dashboard/content/pod_template.py index 2ac2976..06fb642 100644 --- a/src/collective/eeafaceted/dashboard/content/pod_template.py +++ b/src/collective/eeafaceted/dashboard/content/pod_template.py @@ -6,16 +6,15 @@ from collective.eeafaceted.collectionwidget.interfaces import NotDashboardContextException from collective.eeafaceted.collectionwidget.utils import getCurrentCollection from collective.eeafaceted.dashboard import FacetedDashboardMessageFactory as _ - from plone.autoform import directives as form - from z3c.form.browser.checkbox import CheckBoxFieldWidget from z3c.form.browser.radio import RadioFieldWidget from zope import schema from zope.interface import implements - import logging + + logger = logging.getLogger('collective.eeafaceted.dashboard: DashboardPODTemplate') diff --git a/src/collective/eeafaceted/dashboard/testing.py b/src/collective/eeafaceted/dashboard/testing.py index e453424..b80e0df 100644 --- a/src/collective/eeafaceted/dashboard/testing.py +++ b/src/collective/eeafaceted/dashboard/testing.py @@ -1,6 +1,7 @@ # -*- coding: utf-8 -*- """Base module for unittesting.""" +from collective.eeafaceted.dashboard.utils import enableFacetedDashboardFor from plone.app.robotframework.testing import REMOTE_LIBRARY_BUNDLE_FIXTURE from plone.app.testing import applyProfile from plone.app.testing import FunctionalTesting @@ -16,10 +17,8 @@ from zope.component import getMultiAdapter from zope.viewlet.interfaces import IViewletManager -import unittest - import collective.eeafaceted.dashboard -from collective.eeafaceted.dashboard.utils import enableFacetedDashboardFor +import unittest class FacetedDashboardLayer(PloneSandboxLayer): diff --git a/src/collective/eeafaceted/dashboard/tests/test_dashboardcollection.py b/src/collective/eeafaceted/dashboard/tests/test_dashboardcollection.py index 9693e83..1de8858 100644 --- a/src/collective/eeafaceted/dashboard/tests/test_dashboardcollection.py +++ b/src/collective/eeafaceted/dashboard/tests/test_dashboardcollection.py @@ -1,10 +1,10 @@ # -*- coding: utf-8 -*- """Setup/installation tests for this package.""" -from plone import api from collective.eeafaceted.collectionwidget.utils import getCollectionLinkCriterion from collective.eeafaceted.dashboard.testing import IntegrationTestCase from collective.eeafaceted.dashboard.utils import enableFacetedDashboardFor +from plone import api from zope.component import queryUtility from zope.schema.interfaces import IVocabularyFactory diff --git a/src/collective/eeafaceted/dashboard/tests/test_documentgeneration.py b/src/collective/eeafaceted/dashboard/tests/test_documentgeneration.py index b2f1872..06491c1 100644 --- a/src/collective/eeafaceted/dashboard/tests/test_documentgeneration.py +++ b/src/collective/eeafaceted/dashboard/tests/test_documentgeneration.py @@ -1,14 +1,11 @@ # -*- coding: utf-8 -*- -from DateTime import DateTime -from plone import api - from collective.documentgenerator.helper.base import DisplayProxyObject from collective.documentgenerator.helper.base import DocumentGenerationHelperView - -from eea.facetednavigation.interfaces import ICriteria - from collective.eeafaceted.dashboard.testing import IntegrationTestCase +from DateTime import DateTime +from eea.facetednavigation.interfaces import ICriteria +from plone import api class TestDocumentGeneration(IntegrationTestCase): diff --git a/src/collective/eeafaceted/dashboard/tests/test_pod_template.py b/src/collective/eeafaceted/dashboard/tests/test_pod_template.py index 6e1554b..df76696 100644 --- a/src/collective/eeafaceted/dashboard/tests/test_pod_template.py +++ b/src/collective/eeafaceted/dashboard/tests/test_pod_template.py @@ -1,12 +1,12 @@ # -*- coding: utf-8 -*- -from zope.component import queryMultiAdapter -from plone import api from collective.documentgenerator.interfaces import IPODTemplateCondition from collective.eeafaceted.collectionwidget.utils import getCollectionLinkCriterion from collective.eeafaceted.dashboard.content.pod_template import DashboardPODTemplateCondition from collective.eeafaceted.dashboard.testing import IntegrationTestCase +from plone import api from zope.annotation import IAnnotations +from zope.component import queryMultiAdapter class TestDashboardPODTemplate(IntegrationTestCase): diff --git a/src/collective/eeafaceted/dashboard/tests/test_portlet.py b/src/collective/eeafaceted/dashboard/tests/test_portlet.py index 1756aa5..09cf42f 100644 --- a/src/collective/eeafaceted/dashboard/tests/test_portlet.py +++ b/src/collective/eeafaceted/dashboard/tests/test_portlet.py @@ -1,18 +1,19 @@ # -*- coding: utf-8 -*- -import lxml -from zope.annotation import IAnnotations -from zope.component import getUtility -from zope.component import getMultiAdapter -from eea.facetednavigation.criteria.interfaces import ICriteria from collective.eeafaceted.collectionwidget.interfaces import NoCollectionWidgetDefinedException from collective.eeafaceted.collectionwidget.utils import getCollectionLinkCriterion from collective.eeafaceted.collectionwidget.widgets.widget import CollectionWidget -from plone import api -from plone.portlets.interfaces import IPortletManager, IPortletRenderer - from collective.eeafaceted.dashboard.browser import facetedcollectionportlet as portlet from collective.eeafaceted.dashboard.config import DEFAULT_PORTLET_TITLE from collective.eeafaceted.dashboard.testing import IntegrationTestCase +from eea.facetednavigation.criteria.interfaces import ICriteria +from plone import api +from plone.portlets.interfaces import IPortletManager +from plone.portlets.interfaces import IPortletRenderer +from zope.annotation import IAnnotations +from zope.component import getMultiAdapter +from zope.component import getUtility + +import lxml class TestPortlet(IntegrationTestCase): diff --git a/src/collective/eeafaceted/dashboard/tests/test_robot.py b/src/collective/eeafaceted/dashboard/tests/test_robot.py index 7d62e06..520069f 100644 --- a/src/collective/eeafaceted/dashboard/tests/test_robot.py +++ b/src/collective/eeafaceted/dashboard/tests/test_robot.py @@ -1,9 +1,9 @@ -import os -import unittest -import robotsuite +from collective.eeafaceted.dashboard.testing import ACCEPTANCE from plone.testing import layered -from collective.eeafaceted.dashboard.testing import ACCEPTANCE +import os +import robotsuite +import unittest def test_suite(): diff --git a/src/collective/eeafaceted/dashboard/tests/test_views.py b/src/collective/eeafaceted/dashboard/tests/test_views.py index 2eecf52..ddbdaf3 100644 --- a/src/collective/eeafaceted/dashboard/tests/test_views.py +++ b/src/collective/eeafaceted/dashboard/tests/test_views.py @@ -1,10 +1,9 @@ # -*- coding: utf-8 -*- """Test views.""" -import json - +from collective.eeafaceted.dashboard.testing import IntegrationTestCase from plone import api -from collective.eeafaceted.dashboard.testing import IntegrationTestCase +import json class TestJSONCollectionsCount(IntegrationTestCase): @@ -24,7 +23,7 @@ def test_with_dashboard_collections(self): title='Dashboard collection 1', container=self.folder, tal_condition=u'', - roles_bypassing_talcondition=[] + roles_bypassing_talcondition=[], ) dashboardcol2 = api.content.create( id='dc2', diff --git a/src/collective/eeafaceted/dashboard/tests/test_vocabulary.py b/src/collective/eeafaceted/dashboard/tests/test_vocabulary.py index 3559e75..9773277 100644 --- a/src/collective/eeafaceted/dashboard/tests/test_vocabulary.py +++ b/src/collective/eeafaceted/dashboard/tests/test_vocabulary.py @@ -1,11 +1,11 @@ # -*- coding: utf-8 -*- +from collective.eeafaceted.dashboard.testing import IntegrationTestCase +from collective.eeafaceted.dashboard.vocabulary import DashboardCollectionsVocabulary +from eea.facetednavigation.interfaces import IFacetedNavigable +from plone import api from zope.component import queryUtility from zope.interface import alsoProvides from zope.schema.interfaces import IVocabularyFactory -from plone import api -from collective.eeafaceted.dashboard.testing import IntegrationTestCase -from eea.facetednavigation.interfaces import IFacetedNavigable -from collective.eeafaceted.dashboard.vocabulary import DashboardCollectionsVocabulary class TestConditionAwareVocabulary(IntegrationTestCase): From 24718d56d6b9399ba148435d9064d6f2c09f1f14 Mon Sep 17 00:00:00 2001 From: Olivier Delaere <23073839+odelaere@users.noreply.github.com> Date: Thu, 20 Jan 2022 16:02:44 +0100 Subject: [PATCH 3/3] Fix test_views.py --- .../eeafaceted/dashboard/tests/test_views.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/collective/eeafaceted/dashboard/tests/test_views.py b/src/collective/eeafaceted/dashboard/tests/test_views.py index ddbdaf3..3e2e337 100644 --- a/src/collective/eeafaceted/dashboard/tests/test_views.py +++ b/src/collective/eeafaceted/dashboard/tests/test_views.py @@ -24,6 +24,8 @@ def test_with_dashboard_collections(self): container=self.folder, tal_condition=u'', roles_bypassing_talcondition=[], + sort_reversed=False, + query=[] ) dashboardcol2 = api.content.create( id='dc2', @@ -31,7 +33,9 @@ def test_with_dashboard_collections(self): title='Dashboard collection 2', container=self.folder, tal_condition=u'', - roles_bypassing_talcondition=[] + roles_bypassing_talcondition=[], + sort_reversed=False, + query=[] ) dashboardcol3 = api.content.create( id='dc3', @@ -39,7 +43,9 @@ def test_with_dashboard_collections(self): title='Dashboard collection 3', container=self.folder, tal_condition=u'', - roles_bypassing_talcondition=[] + roles_bypassing_talcondition=[], + sort_reversed=False, + query=[] ) dashboardcoll.showNumberOfItems = True dashboardcol2.showNumberOfItems = False