{ "info": { "author": "David Jonas", "author_email": "davidjonasdesign@gmail.com", "bugtrack_url": null, "classifiers": [ "Framework :: Plone", "Intended Audience :: Developers", "License :: OSI Approved :: GNU General Public License (GPL)" ], "description": ".. contents::\n\n.. Note!\n -----\n Update the following URLs to point to your:\n\n - code repository\n - bug tracker\n - questions/comments feedback mail\n (do not set a real mail, to avoid spams)\n\n Or remove it if not used.\n\n- Code repository: http://svn.somewhere.com/...\n- Questions and comments to somemailing_list\n- Report bugs at http://bug.somewhere.com/..\n\n\nChange history\n**************\n\nChangelog\n=========\n\n0.1 (xxxx-xx-xx)\n----------------\n\n- Created recipe with ZopeSkel\n [David Jonas]\n\nDetailed Documentation\n**********************\n\nIntroduction\n============\n\nThis is a full-blown functional test. The emphasis here is on testing what\nthe user may input and see, and the system is largely tested as a black box.\nWe use PloneTestCase to set up this test as well, so we have a full Plone site\nto play with. We *can* inspect the state of the portal, e.g. using \nself.portal and self.folder, but it is often frowned upon since you are not\ntreating the system as a black box. Also, if you, for example, log in or set\nroles using calls like self.setRoles(), these are not reflected in the test\nbrowser, which runs as a separate session.\n\nBeing a doctest, we can tell a story here.\n\nFirst, we must perform some setup. We use the testbrowser that is shipped\nwith Five, as this provides proper Zope 2 integration. Most of the \ndocumentation, though, is in the underlying zope.testbrower package.\n\n >>> from Products.Five.testbrowser import Browser\n >>> browser = Browser()\n >>> portal_url = self.portal.absolute_url()\n\nThe following is useful when writing and debugging testbrowser tests. It lets\nus see all error messages in the error_log.\n\n >>> self.portal.error_log._ignored_exceptions = ()\n\nWith that in place, we can go to the portal front page and log in. We will\ndo this using the default user from PloneTestCase:\n\n >>> from Products.PloneTestCase.setup import portal_owner, default_password\n\nBecause add-on themes or products may remove or hide the login portlet, this test will use the login form that comes with plone. \n\n >>> browser.open(portal_url + '/login_form')\n >>> browser.getControl(name='__ac_name').value = portal_owner\n >>> browser.getControl(name='__ac_password').value = default_password\n >>> browser.getControl(name='submit').click()\n\nHere, we set the value of the fields on the login form and then simulate a\nsubmit click. We then ensure that we get the friendly logged-in message:\n\n >>> \"You are now logged in\" in browser.contents\n True\n\nFinally, let's return to the front page of our site before continuing\n\n >>> browser.open(portal_url)\n\n-*- extra stuff goes here -*-\nThe Object content type\n===============================\n\nIn this section we are tesing the Object content type by performing\nbasic operations like adding, updadating and deleting Object content\nitems.\n\nAdding a new Object content item\n--------------------------------\n\nWe use the 'Add new' menu to add a new content item.\n\n >>> browser.getLink('Add new').click()\n\nThen we select the type of item we want to add. In this case we select\n'Object' and click the 'Add' button to get to the add form.\n\n >>> browser.getControl('Object').click()\n >>> browser.getControl(name='form.button.Add').click()\n >>> 'Object' in browser.contents\n True\n\nNow we fill the form and submit it.\n\n >>> browser.getControl(name='title').value = 'Object Sample'\n >>> browser.getControl('Save').click()\n >>> 'Changes saved' in browser.contents\n True\n\nAnd we are done! We added a new 'Object' content item to the portal.\n\nUpdating an existing Object content item\n---------------------------------------\n\nLet's click on the 'edit' tab and update the object attribute values.\n\n >>> browser.getLink('Edit').click()\n >>> browser.getControl(name='title').value = 'New Object Sample'\n >>> browser.getControl('Save').click()\n\nWe check that the changes were applied.\n\n >>> 'Changes saved' in browser.contents\n True\n >>> 'New Object Sample' in browser.contents\n True\n\nRemoving a/an Object content item\n--------------------------------\n\nIf we go to the home page, we can see a tab with the 'New Object\nSample' title in the global navigation tabs.\n\n >>> browser.open(portal_url)\n >>> 'New Object Sample' in browser.contents\n True\n\nNow we are going to delete the 'New Object Sample' object. First we\ngo to the contents tab and select the 'New Object Sample' for\ndeletion.\n\n >>> browser.getLink('Contents').click()\n >>> browser.getControl('New Object Sample').click()\n\nWe click on the 'Delete' button.\n\n >>> browser.getControl('Delete').click()\n >>> 'Item(s) deleted' in browser.contents\n True\n\nSo, if we go back to the home page, there is no longer a 'New Object\nSample' tab.\n\n >>> browser.open(portal_url)\n >>> 'New Object Sample' in browser.contents\n False\n\nAdding a new Object content item as contributor\n------------------------------------------------\n\nNot only site managers are allowed to add Object content items, but\nalso site contributors.\n\nLet's logout and then login as 'contributor', a portal member that has the\ncontributor role assigned.\n\n >>> browser.getLink('Log out').click()\n >>> browser.open(portal_url + '/login_form')\n >>> browser.getControl(name='__ac_name').value = 'contributor'\n >>> browser.getControl(name='__ac_password').value = default_password\n >>> browser.getControl(name='submit').click()\n >>> browser.open(portal_url)\n\nWe use the 'Add new' menu to add a new content item.\n\n >>> browser.getLink('Add new').click()\n\nWe select 'Object' and click the 'Add' button to get to the add form.\n\n >>> browser.getControl('Object').click()\n >>> browser.getControl(name='form.button.Add').click()\n >>> 'Object' in browser.contents\n True\n\nNow we fill the form and submit it.\n\n >>> browser.getControl(name='title').value = 'Object Sample'\n >>> browser.getControl('Save').click()\n >>> 'Changes saved' in browser.contents\n True\n\nDone! We added a new Object content item logged in as contributor.\n\nFinally, let's login back as manager.\n\n >>> browser.getLink('Log out').click()\n >>> browser.open(portal_url + '/login_form')\n >>> browser.getControl(name='__ac_name').value = portal_owner\n >>> browser.getControl(name='__ac_password').value = default_password\n >>> browser.getControl(name='submit').click()\n >>> browser.open(portal_url)\n\n\n\n\nContributors\n************\n\nDavid Jonas, Author\n\n\nDownload\n********", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "http://svn.plone.org/svn/collective/", "keywords": "contenttype archetypes", "license": "GPL", "maintainer": null, "maintainer_email": null, "name": "Products.Object", "package_url": "https://pypi.org/project/Products.Object/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/Products.Object/", "project_urls": { "Download": "UNKNOWN", "Homepage": "http://svn.plone.org/svn/collective/" }, "release_url": "https://pypi.org/project/Products.Object/0.11/", "requires_dist": null, "requires_python": null, "summary": "Content type to describe a physical object", "version": "0.11" }, "last_serial": 785056, "releases": { "0.10": [ { "comment_text": "", "digests": { "md5": "bb9c8b0f0a3ff3b30b3452cf06df0e16", "sha256": "864a96a32f4b185c10fd0b02465a4c63a5f20ac5b99d7fd942d545b6903427bf" }, "downloads": -1, "filename": "Products.Object-0.10.tar.gz", "has_sig": false, "md5_digest": "bb9c8b0f0a3ff3b30b3452cf06df0e16", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 20165, "upload_time": "2012-07-09T18:58:46", "url": "https://files.pythonhosted.org/packages/a6/ea/df4d491f56a61d92f8c3a22144c42888a31981104ec40707c55051ee83dd/Products.Object-0.10.tar.gz" } ], "0.11": [ { "comment_text": "", "digests": { "md5": "399461954d574abe3e8c7a79e2270d2c", "sha256": "3c8a55504c50208ca3e782e20ec43ea2f3d74504750a7a1fbd208781a1a52074" }, "downloads": -1, "filename": "Products.Object-0.11.tar.gz", "has_sig": false, "md5_digest": "399461954d574abe3e8c7a79e2270d2c", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 20158, "upload_time": "2012-08-14T16:59:34", "url": "https://files.pythonhosted.org/packages/e1/71/6b933ae12cdb5b0e17804fa33d2c5786c15256b6b452b7ab87fe2dabdac0/Products.Object-0.11.tar.gz" } ], "0.2": [ { "comment_text": "", "digests": { "md5": "52ce16025ec694eb7d592bdd9212ed1b", "sha256": "a85a167a5d0b036ca125d8475e82f54fa349d38a4687055feddc5f9c580aede8" }, "downloads": -1, "filename": "Products.Object-0.2.tar.gz", "has_sig": false, "md5_digest": "52ce16025ec694eb7d592bdd9212ed1b", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 18667, "upload_time": "2012-05-01T13:18:13", "url": "https://files.pythonhosted.org/packages/8b/8f/123b12652b33d53b7b7c792ac6b080a7805864f9bc962adf12f768724fbf/Products.Object-0.2.tar.gz" } ], "0.2sdist": [], "0.3": [ { "comment_text": "", "digests": { "md5": "3c88c01b8542c7a2b6c3f96035b6cb07", "sha256": "a1716665da3dee288090b97ccc9d8f4cbf2915a1a9d599c7c0c90d90851ef378" }, "downloads": -1, "filename": "Products.Object-0.3.tar.gz", "has_sig": false, "md5_digest": "3c88c01b8542c7a2b6c3f96035b6cb07", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 19304, "upload_time": "2012-05-02T12:06:46", "url": "https://files.pythonhosted.org/packages/36/27/8491f3d42fb84f55903140865500d58ab28d6c1bd4b0955b50fea6ec4855/Products.Object-0.3.tar.gz" } ], "0.4": [ { "comment_text": "", "digests": { "md5": "955698d624918815c0c3aaf5121fc8af", "sha256": "2a05941dcc0c6d53b8799ac85195d528482fbb9d6417896dc70c5fbd1c2f870f" }, "downloads": -1, "filename": "Products.Object-0.4.tar.gz", "has_sig": false, "md5_digest": "955698d624918815c0c3aaf5121fc8af", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 19317, "upload_time": "2012-05-02T19:10:41", "url": "https://files.pythonhosted.org/packages/2e/2c/2a1b8775bfbbbfcfd3c072c394076f3390cce30a6b6efe9fdfed4740008f/Products.Object-0.4.tar.gz" } ], "0.5": [ { "comment_text": "", "digests": { "md5": "b11d3bda25a7fc63c8259a4218d15034", "sha256": "0032392cac708e846cf7dc5d6d4edac5e09aa665c8ee939eba9ea09894909d7f" }, "downloads": -1, "filename": "Products.Object-0.5.tar.gz", "has_sig": false, "md5_digest": "b11d3bda25a7fc63c8259a4218d15034", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 19364, "upload_time": "2012-05-08T17:30:38", "url": "https://files.pythonhosted.org/packages/2f/af/6694df2f502df933a76d8a0fc3eabb4bc32177d878020fe1ba9dc682afb1/Products.Object-0.5.tar.gz" } ], "0.6": [ { "comment_text": "", "digests": { "md5": "3ee3c4a23e6e844a2a906c5ed9c5c21f", "sha256": "410c78eeb1d096faf40b6e54ce1be1118508be7bac4fa1e8f61beb16fadeb8dd" }, "downloads": -1, "filename": "Products.Object-0.6.tar.gz", "has_sig": false, "md5_digest": "3ee3c4a23e6e844a2a906c5ed9c5c21f", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 19451, "upload_time": "2012-05-16T17:50:40", "url": "https://files.pythonhosted.org/packages/92/a4/f16b72a3597ca24742decbde5c029d365b11e69e92512e3f4def29016cac/Products.Object-0.6.tar.gz" } ], "0.7": [ { "comment_text": "", "digests": { "md5": "50827460569a0b0dac17bef35b9d9275", "sha256": "1bface53679f6ca876803e1c38a014777f03ad5f427caff54ca8397f4d8ddba6" }, "downloads": -1, "filename": "Products.Object-0.7.tar.gz", "has_sig": false, "md5_digest": "50827460569a0b0dac17bef35b9d9275", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 19511, "upload_time": "2012-05-22T17:53:50", "url": "https://files.pythonhosted.org/packages/b3/49/909dc62b949a2db46c1b13e4199dddff88e82c4e971d33ebe362e2889f5b/Products.Object-0.7.tar.gz" } ], "0.8": [ { "comment_text": "", "digests": { "md5": "741be4911d91f828ee0876e0174ea821", "sha256": "3b3d0042675404d75230f65711df2b8dd887228f7f5c507dec9322df1f0041cc" }, "downloads": -1, "filename": "Products.Object-0.8.tar.gz", "has_sig": false, "md5_digest": "741be4911d91f828ee0876e0174ea821", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 19694, "upload_time": "2012-06-07T19:05:13", "url": "https://files.pythonhosted.org/packages/bc/b9/084d5692d3ff401c78b0c3ffb4e6b82c38ceaed5ca888cb386b9a7d70539/Products.Object-0.8.tar.gz" } ], "0.9": [ { "comment_text": "", "digests": { "md5": "cff631f9de10a7440c47dd0d028aa83f", "sha256": "ac05d1b27fd99b9b7d491ffc5aa71005512e440fe70fc5f7da401f1273056837" }, "downloads": -1, "filename": "Products.Object-0.9.tar.gz", "has_sig": false, "md5_digest": "cff631f9de10a7440c47dd0d028aa83f", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 19826, "upload_time": "2012-06-14T19:41:42", "url": "https://files.pythonhosted.org/packages/40/a9/703c71c5bc1400e4df622b49d8b3a92e254477dba81e4dfec4e60583fe62/Products.Object-0.9.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "399461954d574abe3e8c7a79e2270d2c", "sha256": "3c8a55504c50208ca3e782e20ec43ea2f3d74504750a7a1fbd208781a1a52074" }, "downloads": -1, "filename": "Products.Object-0.11.tar.gz", "has_sig": false, "md5_digest": "399461954d574abe3e8c7a79e2270d2c", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 20158, "upload_time": "2012-08-14T16:59:34", "url": "https://files.pythonhosted.org/packages/e1/71/6b933ae12cdb5b0e17804fa33d2c5786c15256b6b452b7ab87fe2dabdac0/Products.Object-0.11.tar.gz" } ] }