Skip to content

Commit

Permalink
Add Archetype Collection creation test.
Browse files Browse the repository at this point in the history
  • Loading branch information
idgserpro committed Aug 14, 2018
1 parent 2626aa4 commit cb25f5c
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions src/plone/api/tests/test_content.py
Original file line number Diff line number Diff line change
Expand Up @@ -376,6 +376,22 @@ 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."""
collection = api.content.create(
container=self.portal,
type='Collection',
title='Mandelbrot set',
description='Image gallery of a zoom sequence',
query=[{
'i': 'Type',
'o': 'plone.app.querystring.operation.string.is',
'v': ['Image'],
}],
)
self.assertEqual(collection.Title(), 'Mandelbrot set')

def test_get_constraints(self):
"""Test the constraints when content is fetched with get."""

Expand Down

1 comment on commit cb25f5c

@mister-roboto
Copy link

Choose a reason for hiding this comment

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

idgserpro your emails are not known to GitHub and thus it is impossible to know if you have signed the Plone Contributor Agreement, which is required to merge this pull request.

Learn about the Plone Contributor Agreement: http://docs.plone.org/develop/coredev/docs/contributors_agreement_explained.html How to add more emails to your GitHub account: https://help.github.com/articles/adding-an-email-address-to-your-github-account/

Please sign in to comment.