-
-
Notifications
You must be signed in to change notification settings - Fork 56
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
Fix falining AT Collection creation when using api.content.create. #414
Conversation
Hi @idgserpro FYI |
…ils because of a bug in plone.api==1.8.4. See plone/plone.api#414
src/plone/api/tests/test_content.py
Outdated
|
||
@unittest.skipUnless(HAS_PACONTENTYPES, 'Dexterity only') | ||
def test_create_dx_event(self): | ||
"""https://github.com/plone/plone.app.contenttypes/issues/465""" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@hvelarde what's the relationship between plone/plone.app.contenttypes#465 and plone.api
? It seems to me more a problem of plone.app.contenttypes
.
I think this test can continue but without reference to plone.app.contenttypes
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
IIRC, I was unable to reproduce it on a clean Plone installation; so maybe it's not related at all; we may remove the reference.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I fixed the typos and run test for AT and DX and Travis is green.
I kept the test regarding the event creation, do not know if it is necessary now that we have a test with Collection creation for AT and DX?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In fact what avoids #364 is the AT test. But it's good to have an event creation test with DX
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK so I would remove the test_create_at_event, unnecessary now because of test_create_collection?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Right, so let's merge? :-)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@gbastien I think it is necessary now only to remove the reference:
plone/plone.app.contenttypes#465
in docstring.
src/plone/api/tests/test_content.py
Outdated
@@ -376,6 +376,64 @@ def test_create_at_with_title_in_request(self): | |||
|
|||
self.assertEqual(page.title, 'Test document') | |||
|
|||
@unittest.skipIf(HAS_PACONTENTYPES, 'Archetypes only') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@gbastien thinking minor, I think this test should run with dx too. Collection creation should work with dx. You can remove this condition and change the name of the test.
CHANGES.rst
Outdated
@@ -21,6 +21,9 @@ Bug fixes: | |||
- fix typos in doc strings | |||
[tkimnguyen] | |||
|
|||
- Fix falining AT Collection creation when using api.content.create. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
typo
src/plone/api/tests/test_content.py
Outdated
@@ -376,6 +376,64 @@ def test_create_at_with_title_in_request(self): | |||
|
|||
self.assertEqual(page.title, 'Test document') | |||
|
|||
@unittest.skipIf(HAS_PACONTENTYPES, 'Archetypes only') | |||
def test_create_at_collection(self): | |||
"""Test create at Collecition.""" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
typo
@gbastien you need to run the Jenkins jobs also. |
src/plone/api/tests/test_content.py
Outdated
|
||
@unittest.skipUnless(HAS_PACONTENTYPES, 'Dexterity only') | ||
def test_create_dx_event(self): | ||
""" """ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it doesn't make sense to have an empty docstring.
@hvelarde ready to merge ? ;-) |
I prefer to leave it to one @plone/framework-team member. |
This test confirms the fix for plone/plone.api#414.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can confirm this fixes indeed all previous issues.
@plone/release-team can we have a new release, please? |
@hvelarde done: https://pypi.org/project/plone.api/ 1.8.6 |
@gforcada in fact, it's 1.8.5. |
I also added the AT/DX event creation related tests from PR #407.
With this, the Collection creation is correct.
Thank you,
Gauthier