Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding schema and improving tests to make it p5 compatible #10

Merged
merged 5 commits into from
Oct 27, 2016

Conversation

prakharjoshi
Copy link
Member

@hvelarde @fulv @mauritsvanrees This is a new PR of the work done by @fulv .

  • This PR is to make QA and implementation differently. This includes the improvements to make this add-on compatible for p5.
  • Remove P3 dependencies.

Here travis will fail. Travis improvement will be in other branch :)

@hvelarde hvelarde force-pushed the add-schema-for-mail-to-group branch from 5013bb9 to 8661d6b Compare April 4, 2016 21:16
@hvelarde
Copy link
Member

hvelarde commented Apr 4, 2016

I made a few changes on the buildout configuration; update your branch with the following command before continue working on this:

git reset --hard origin/add-schema-for-mail-to-group

the idea is that tests must pass on all supported branches before merging; as you can see this is not the case.

@hvelarde hvelarde force-pushed the add-schema-for-mail-to-group branch from 3e530a1 to 8661d6b Compare April 7, 2016 18:16
@fulv fulv changed the title Adding schema and improving tests to make it p5 compiatable Adding schema and improving tests to make it p5 compatible Oct 22, 2016
@fulv
Copy link
Member

fulv commented Oct 23, 2016

I'm getting a strange test error, because apparently there is no Folder type in portal_types. Any ideas? This is in Plone 5, not 4.

> bin/test -s collective.contentrules.mailtogroup -D
Running collective.contentrules.mailtogroup.tests.test_action_mail_to_group.TestMailToGroup:Integration tests:
  Set up plone.testing.zca.LayerCleanup in 0.001 seconds.
  Set up plone.testing.z2.Startup in 0.948 seconds.
  Set up plone.app.testing.layers.PloneFixture in 24.447 seconds.
  Set up collective.contentrules.mailtogroup.tests.test_action_mail_to_group.TestMailToGroupFixture in 0.119 seconds.
  Set up collective.contentrules.mailtogroup.tests.test_action_mail_to_group.TestMailToGroup:Integration in 0.000 seconds.
  Running:
    1/6 (16.7%)

Error in test testExecute (collective.contentrules.mailtogroup.tests.test_action_mail_to_group.TestMailAction)
Traceback (most recent call last):
  File "/usr/lib/python2.7/unittest/case.py", line 399, in debug
    self.setUp()
  File "/home/fulvio/plone/ploneconfsprint/mailtogroup.plone5/eggs/plone.app.testing-5.0.2-py2.7.egg/plone/app/testing/bbb.py", line 72, in setUp
    self.afterSetUp()
  File "/home/fulvio/plone/ploneconfsprint/mailtogroup.plone5/collective/contentrules/mailtogroup/tests/test_action_mail_to_group.py", line 69, in afterSetUp
    self.portal.invokeFactory('Folder', 'target')
  File "/home/fulvio/plone/ploneconfsprint/mailtogroup.plone5/eggs/Products.CMFCore-2.2.10-py2.7.egg/Products/CMFCore/PortalFolder.py", line 292, in invokeFactory
    return pt.constructContent(type_name, self, id, RESPONSE, *args, **kw)
  File "/home/fulvio/plone/ploneconfsprint/mailtogroup.plone5/eggs/Products.CMFCore-2.2.10-py2.7.egg/Products/CMFCore/TypesTool.py", line 831, in constructContent
    raise ValueError('No such content type: %s' % type_name)
ValueError: No such content type: Folder

<type 'exceptions.ValueError'>:
No such content type: Folder

(Pdb) pp self.__dict__
{'Discussion Item': <FactoryTypeInformation at Discussion Item>,
 'Plone Site': <DynamicViewTypeInformation at Plone Site>,
 'TempFolder': <FactoryTypeInformation at TempFolder>,
 '__ac_local_roles__': {'admin': ['Owner']},
 '_objects': ({'id': 'Discussion Item',
               'meta_type': 'Factory-based Type Information'},
              {'id': 'Plone Site',
               'meta_type': 'Factory-based Type Information with dynamic views'},
              {'id': 'TempFolder',
               'meta_type': 'Factory-based Type Information'}),
 'title': 'Controls the available content types in your portal'}

@davisagli
Copy link
Member

@fulv plone.app.testing.PLONE_FIXTURE does not include content types. It's used as the basis for both plone.app.contenttypes- and ATContentTypes-based fixtures.

@hvelarde
Copy link
Member

@fulv I think this package is mature and I'm fine with making a new 2.0 release oncly compatible with Plone 5 and beyond.

feel free to remove the conditionals and unneeded code.

@coveralls
Copy link

coveralls commented Oct 25, 2016

Coverage Status

Coverage increased (+0.8%) to 84.173% when pulling c6005a5 on add-schema-for-mail-to-group into ea4002f on master.

@fulv
Copy link
Member

fulv commented Oct 25, 2016

Woot! All tests pass, 4.3, 5.0 and 5.1!
Ready to merge, but do not release yet.
There is one more issue that needs to be fixed.

@fulv fulv force-pushed the add-schema-for-mail-to-group branch from d8d5aa0 to 5275c75 Compare October 25, 2016 23:29
@fulv
Copy link
Member

fulv commented Oct 25, 2016

Now with squashed commits.

@fulv
Copy link
Member

fulv commented Oct 26, 2016

@hvelarde Would you do me the honor of merging this?

prakharjoshi and others added 5 commits October 27, 2016 13:28
Fix 4.x tests and backward compatibility.

Fix robot import failure in Plone 5 tests, and some flake fixes.

Fix conditional zcml import for plone 4 and 5.

Use integration instead of functional testing layer.  No difference.

Fix tests for Plone 5.

Fix tests for Plone 4.  Fix some flake8 issues.

Fix some flake8 issues.

Fix some flake8 issues.

Fix another syntax error in tests.

Fix isort issues.
@hvelarde hvelarde merged commit 813c1d3 into master Oct 27, 2016
@hvelarde hvelarde deleted the add-schema-for-mail-to-group branch October 27, 2016 16:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants