Skip to content

Commit

Permalink
Adapt tests to Products.GenericSetup >= 2.0.
Browse files Browse the repository at this point in the history
  • Loading branch information
Michael Howitz committed May 16, 2018
1 parent afe96d4 commit b6f56cd
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 6 deletions.
7 changes: 4 additions & 3 deletions CHANGES.rst
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
Changelog
=========

4.0.19 (unreleased)
-------------------
4.1 (unreleased)
----------------

Breaking changes:

- *add item here*
- Adapt tests to `Products.GenericSetup >= 2.0` thus requiring at least that
version.

New features:

Expand Down
16 changes: 16 additions & 0 deletions buildout.cfg
Original file line number Diff line number Diff line change
@@ -1,7 +1,23 @@
[buildout]
extensions = mr.developer
auto-checkout = *
extends = https://raw.githubusercontent.com/collective/buildout.plonetest/master/test-5.x.cfg
https://raw.githubusercontent.com/plone/buildout.coredev/5.2/versions.cfg
package-name = plone.app.contentrules
package-extras = [test]

[remotes]
plone = https://github.com/plone
plone_push = git@github.com:plone
zope = https://github.com/zopefoundation
zope_push = git@github.com:zopefoundation

[sources]
Products.CMFCore = git ${remotes:zope}/Products.CMFCore.git pushurl=${remotes:zope_push}/Products.CMFCore.git branch=master
Products.CMFFormController = git ${remotes:plone}/Products.CMFFormController.git pushurl=${remotes:plone_push}/Products.CMFFormController.git branch=master
Products.CMFPlone = git ${remotes:plone}/Products.CMFPlone.git pushurl=${remotes:plone_push}/Products.CMFPlone.git branch=master
Products.GenericSetup = git ${remotes:zope}/Products.GenericSetup.git pushurl=${remotes:zope_push}/Products.GenericSetup.git branch=master
Products.PlonePAS = git ${remotes:plone}/Products.PlonePAS.git pushurl=${remotes:plone_push}/Products.PlonePAS.git branch=master

[versions]
plone.app.contentrules =
2 changes: 1 addition & 1 deletion plone/app/contentrules/tests/test_configuration.py
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ def testExport(self):
exporter = getMultiAdapter(
(site, context), IBody, name=u'plone.contentrules')

expected = """<?xml version="1.0"?>
expected = """<?xml version="1.0" encoding="utf-8"?>
<contentrules>
<rule name="test1" title="Test rule 1" cascading="False"
description="A test rule" enabled="True"
Expand Down
4 changes: 2 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# -*- coding: utf-8 -*-
from setuptools import setup, find_packages

version = '4.0.19.dev0'
version = '4.1.dev0'

setup(
name='plone.app.contentrules',
Expand Down Expand Up @@ -55,7 +55,7 @@
'Acquisition',
'Products.CMFPlone',
'Products.CMFCore',
'Products.GenericSetup',
'Products.GenericSetup >= 2.0.dev0',
'Products.statusmessages',
'ZODB3',
'Zope2 >= 2.12.3',
Expand Down

1 comment on commit b6f56cd

@jenkins-plone-org
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@icemac Jenkins CI reporting about code analysis
See the full report here: https://jenkins.plone.org/job/package-plone.app.contentrules/41/violations

plone/app/contentrules/handlers.py:80:12: P002 found "hasattr", consider replacing it
plone/app/contentrules/handlers.py:82:12: P002 found "hasattr", consider replacing it
plone/app/contentrules/handlers.py:89:8: P002 found "hasattr", consider replacing it
plone/app/contentrules/handlers.py:92:8: P002 found "hasattr", consider replacing it
plone/app/contentrules/tests/test_condition_wftransition.py:71:18: C812 missing trailing comma
plone/app/contentrules/tests/test_condition_wftransition.py:86:18: C812 missing trailing comma
plone/app/contentrules/tests/test_condition_wftransition.py:101:18: C812 missing trailing comma
plone/app/contentrules/tests/test_action_mail.py:93:14: C812 missing trailing comma
plone/app/contentrules/tests/test_action_mail.py:245:73: C812 missing trailing comma
plone/app/contentrules/tests/test_events.py:8:11: T000 Todo note found.
plone/app/contentrules/tests/test_events.py:12:11: T000 Todo note found.
plone/app/contentrules/tests/test_action_workflow.py:74:14: C812 missing trailing comma
plone/app/contentrules/tests/test_action_workflow.py:93:14: C812 missing trailing comma
plone/app/contentrules/actions/logger.py:22:60: C812 missing trailing comma
plone/app/contentrules/actions/logger.py:50:10: C812 missing trailing comma
plone/app/contentrules/actions/logger.py:94:18: C812 missing trailing comma
plone/app/contentrules/actions/copy.py:85:45: C812 missing trailing comma
plone/app/contentrules/actions/copy.py:86:18: C812 missing trailing comma
plone/app/contentrules/actions/copy.py:126:56: C812 missing trailing comma
plone/app/contentrules/actions/mail.py:38:22: C812 missing trailing comma
plone/app/contentrules/actions/mail.py:44:57: C812 missing trailing comma
plone/app/contentrules/actions/mail.py:46:23: C812 missing trailing comma
plone/app/contentrules/actions/mail.py:52:67: C812 missing trailing comma
plone/app/contentrules/actions/mail.py:54:22: C812 missing trailing comma
plone/app/contentrules/actions/mail.py:58:80: C812 missing trailing comma
plone/app/contentrules/actions/mail.py:63:22: C812 missing trailing comma
plone/app/contentrules/actions/mail.py:101:5: C901 'MailActionExecutor.__call__' is too complex (12)
plone/app/contentrules/actions/mail.py:105:74: C812 missing trailing comma
plone/app/contentrules/actions/mail.py:128:78: C812 missing trailing comma
plone/app/contentrules/actions/mail.py:134:80: E501 line too long (81 > 79 characters)
plone/app/contentrules/actions/mail.py:149:19: C812 missing trailing comma
plone/app/contentrules/actions/mail.py:162:19: T000 Todo note found.
plone/app/contentrules/actions/mail.py:173:78: C812 missing trailing comma
plone/app/contentrules/actions/move.py:54:52: C812 missing trailing comma
plone/app/contentrules/actions/move.py:69:5: C901 'MoveActionExecutor.__call__' is too complex (14)
plone/app/contentrules/actions/move.py:91:18: C812 missing trailing comma
plone/app/contentrules/actions/move.py:153:56: C812 missing trailing comma
plone/app/contentrules/conditions/portaltype.py:33:72: C812 missing trailing comma
plone/app/contentrules/conditions/portaltype.py:34:10: C812 missing trailing comma
plone/app/contentrules/conditions/portaltype.py:60:50: C812 missing trailing comma
plone/app/contentrules/conditions/portaltype.py:79:16: P002 found "hasattr", consider replacing it
plone/app/contentrules/conditions/portaltype.py:98:34: C812 missing trailing comma
plone/app/contentrules/conditions/portaltype.py:119:26: C812 missing trailing comma
plone/app/contentrules/conditions/wftransition.py:28:68: C812 missing trailing comma
plone/app/contentrules/conditions/wftransition.py:29:10: C812 missing trailing comma
plone/app/contentrules/conditions/fileextension.py:31:22: C812 missing trailing comma
plone/app/contentrules/conditions/fileextension.py:49:50: C812 missing trailing comma
plone/app/contentrules/conditions/fileextension.py:90:78: C812 missing trailing comma
plone/app/contentrules/conditions/fileextension.py:113:78: C812 missing trailing comma
plone/app/contentrules/conditions/wfstate.py:28:63: C812 missing trailing comma
plone/app/contentrules/conditions/wfstate.py:29:10: C812 missing trailing comma
plone/app/contentrules/conditions/wfstate.py:46:59: C812 missing trailing comma
plone/app/contentrules/conditions/group.py:27:77: C812 missing trailing comma
plone/app/contentrules/conditions/group.py:45:60: C812 missing trailing comma
plone/app/contentrules/conditions/group.py:84:70: C812 missing trailing comma
plone/app/contentrules/conditions/group.py:105:70: C812 missing trailing comma
plone/app/contentrules/conditions/role.py:28:76: C812 missing trailing comma
plone/app/contentrules/conditions/role.py:46:59: C812 missing trailing comma
plone/app/contentrules/conditions/role.py:84:51: C812 missing trailing comma
plone/app/contentrules/conditions/role.py:105:51: C812 missing trailing comma
plone/app/contentrules/browser/elements.py:29:5: C901 'ManageElements.__call__' is too complex (12)
plone/app/contentrules/browser/elements.py:77:45: C812 missing trailing comma
plone/app/contentrules/browser/assignments.py:24:5: C901 'ManageAssignments.__call__' is too complex (14)
plone/app/contentrules/browser/assignments.py:154:54: C812 missing trailing comma
plone/app/contentrules/browser/controlpanel.py:83:18: C812 missing trailing comma
plone/app/contentrules/exportimport/rules.py:30:1: I004 isort found an unexpected blank line in imports
plone/app/contentrules/exportimport/rules.py:138:11: T000 Todo note found.
plone/app/contentrules/exportimport/rules.py:201:5: C901 'RulesXMLAdapter._initRules' is too complex (21)

Follow these instructions to reproduce it locally.

Please sign in to comment.