{ "info": { "author": "Peter Dyson", "author_email": "pjdyson@gmail.com", "bugtrack_url": null, "classifiers": [ "Framework :: Plone", "Intended Audience :: Developers", "License :: OSI Approved :: GNU General Public License (GPL)", "Topic :: Software Development :: Libraries :: Python Modules" ], "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 \n Change history\n **************\n \n Changelog\n =========\n \n 0.3 (xxxx-xx-xx)\n ----------------\n \n - Created recipe with ZopeSkel\n [Peter Dyson]\n \n Detailed Documentation\n **********************\n \n Introduction\n ============\n \n This is a full-blown functional test. The emphasis here is on testing what\n the user may input and see, and the system is largely tested as a black box.\n We use PloneTestCase to set up this test as well, so we have a full Plone site\n to play with. We *can* inspect the state of the portal, e.g. using\n self.portal and self.folder, but it is often frowned upon since you are not\n treating the system as a black box. Also, if you, for example, log in or set\n roles using calls like self.setRoles(), these are not reflected in the test\n browser, which runs as a separate session.\n \n Being a doctest, we can tell a story here.\n \n First, we must perform some setup. We use the testbrowser that is shipped\n with Five, as this provides proper Zope 2 integration. Most of the\n documentation, 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 \n The following is useful when writing and debugging testbrowser tests. It lets\n us see all error messages in the error_log.\n \n >>> self.portal.error_log._ignored_exceptions = ()\n \n With that in place, we can go to the portal front page and log in. We will\n do this using the default user from PloneTestCase:\n \n >>> from Products.PloneTestCase.setup import portal_owner, default_password\n \n >>> browser.open(portal_url)\n \n We have the login portlet, so let's use that.\n \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 \n Here, we set the value of the fields on the login form and then simulate a\n submit click.\n \n We then test that we are still on the portal front page:\n \n >>> browser.url == portal_url\n True\n \n And we ensure that we get the friendly logged-in message:\n \n >>> \"You are now logged in\" in browser.contents\n True\n \n \n -*- extra stuff goes here -*-\n The street_view content type\n ===============================\n \n In this section we are tesing the street_view content type by performing\n basic operations like adding, updadating and deleting street_view content\n items.\n \n Adding a new street_view content item\n --------------------------------\n \n We use the 'Add new' menu to add a new content item.\n \n >>> browser.getLink('Add new').click()\n \n Then we select the type of item we want to add. In this case we select\n 'street_view' and click the 'Add' button to get to the add form.\n \n >>> browser.getControl('street_view').click()\n >>> browser.getControl(name='form.button.Add').click()\n >>> 'street_view' in browser.contents\n True\n \n Now we fill the form and submit it.\n \n >>> browser.getControl(name='title').value = 'street_view Sample'\n >>> browser.getControl('Save').click()\n >>> 'Changes saved' in browser.contents\n True\n \n And we are done! We added a new 'street_view' content item to the portal.\n \n Updating an existing street_view content item\n ---------------------------------------\n \n Let'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 street_view Sample'\n >>> browser.getControl('Save').click()\n \n We check that the changes were applied.\n \n >>> 'Changes saved' in browser.contents\n True\n >>> 'New street_view Sample' in browser.contents\n True\n \n Removing a/an street_view content item\n --------------------------------\n \n If we go to the home page, we can see a tab with the 'New street_view\n Sample' title in the global navigation tabs.\n \n >>> browser.open(portal_url)\n >>> 'New street_view Sample' in browser.contents\n True\n \n Now we are going to delete the 'New street_view Sample' object. First we\n go to the contents tab and select the 'New street_view Sample' for\n deletion.\n \n >>> browser.getLink('Contents').click()\n >>> browser.getControl('New street_view Sample').click()\n \n We click on the 'Delete' button.\n \n >>> browser.getControl('Delete').click()\n >>> 'Item(s) deleted' in browser.contents\n True\n \n So, if we go back to the home page, there is no longer a 'New street_view\n Sample' tab.\n \n >>> browser.open(portal_url)\n >>> 'New street_view Sample' in browser.contents\n False\n \n Adding a new street_view content item as contributor\n ------------------------------------------------\n \n Not only site managers are allowed to add street_view content items, but\n also site contributors.\n \n Let's logout and then login as 'contributor', a portal member that has the\n contributor role assigned.\n \n >>> browser.getLink('Log out').click()\n >>> browser.open(portal_url)\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 \n We use the 'Add new' menu to add a new content item.\n \n >>> browser.getLink('Add new').click()\n \n We select 'street_view' and click the 'Add' button to get to the add form.\n \n >>> browser.getControl('street_view').click()\n >>> browser.getControl(name='form.button.Add').click()\n >>> 'street_view' in browser.contents\n True\n \n Now we fill the form and submit it.\n \n >>> browser.getControl(name='title').value = 'street_view Sample'\n >>> browser.getControl('Save').click()\n >>> 'Changes saved' in browser.contents\n True\n \n Done! We added a new street_view content item logged in as contributor.\n \n Finally, let's login back as manager.\n \n >>> browser.getLink('Log out').click()\n >>> browser.open(portal_url)\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 The shop_front content type\n ===============================\n \n In this section we are tesing the shop_front content type by performing\n basic operations like adding, updadating and deleting shop_front content\n items.\n \n Adding a new shop_front content item\n --------------------------------\n \n We use the 'Add new' menu to add a new content item.\n \n >>> browser.getLink('Add new').click()\n \n Then we select the type of item we want to add. In this case we select\n 'shop_front' and click the 'Add' button to get to the add form.\n \n >>> browser.getControl('shop_front').click()\n >>> browser.getControl(name='form.button.Add').click()\n >>> 'shop_front' in browser.contents\n True\n \n Now we fill the form and submit it.\n \n >>> browser.getControl(name='title').value = 'shop_front Sample'\n >>> browser.getControl('Save').click()\n >>> 'Changes saved' in browser.contents\n True\n \n And we are done! We added a new 'shop_front' content item to the portal.\n \n Updating an existing shop_front content item\n ---------------------------------------\n \n Let'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 shop_front Sample'\n >>> browser.getControl('Save').click()\n \n We check that the changes were applied.\n \n >>> 'Changes saved' in browser.contents\n True\n >>> 'New shop_front Sample' in browser.contents\n True\n \n Removing a/an shop_front content item\n --------------------------------\n \n If we go to the home page, we can see a tab with the 'New shop_front\n Sample' title in the global navigation tabs.\n \n >>> browser.open(portal_url)\n >>> 'New shop_front Sample' in browser.contents\n True\n \n Now we are going to delete the 'New shop_front Sample' object. First we\n go to the contents tab and select the 'New shop_front Sample' for\n deletion.\n \n >>> browser.getLink('Contents').click()\n >>> browser.getControl('New shop_front Sample').click()\n \n We click on the 'Delete' button.\n \n >>> browser.getControl('Delete').click()\n >>> 'Item(s) deleted' in browser.contents\n True\n \n So, if we go back to the home page, there is no longer a 'New shop_front\n Sample' tab.\n \n >>> browser.open(portal_url)\n >>> 'New shop_front Sample' in browser.contents\n False\n \n Adding a new shop_front content item as contributor\n ------------------------------------------------\n \n Not only site managers are allowed to add shop_front content items, but\n also site contributors.\n \n Let's logout and then login as 'contributor', a portal member that has the\n contributor role assigned.\n \n >>> browser.getLink('Log out').click()\n >>> browser.open(portal_url)\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 \n We use the 'Add new' menu to add a new content item.\n \n >>> browser.getLink('Add new').click()\n \n We select 'shop_front' and click the 'Add' button to get to the add form.\n \n >>> browser.getControl('shop_front').click()\n >>> browser.getControl(name='form.button.Add').click()\n >>> 'shop_front' in browser.contents\n True\n \n Now we fill the form and submit it.\n \n >>> browser.getControl(name='title').value = 'shop_front Sample'\n >>> browser.getControl('Save').click()\n >>> 'Changes saved' in browser.contents\n True\n \n Done! We added a new shop_front content item logged in as contributor.\n \n Finally, let's login back as manager.\n \n >>> browser.getLink('Log out').click()\n >>> browser.open(portal_url)\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 \n Contributors\n ************\n \n Peter Dyson, Author\n \n \n Download\n ********", "description_content_type": null, "docs_url": null, "download_url": null, "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "http://svn.plone.org/svn/plone/plone.example", "keywords": "wwp plone zope shop shopfront store shopfronts", "license": "GPL", "maintainer": null, "maintainer_email": null, "name": "wwp.shopfronts", "package_url": "https://pypi.org/project/wwp.shopfronts/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/wwp.shopfronts/", "project_urls": { "Homepage": "http://svn.plone.org/svn/plone/plone.example" }, "release_url": "https://pypi.org/project/wwp.shopfronts/0.3dev/", "requires_dist": null, "requires_python": null, "summary": "Display online shopfronts", "version": "0.3dev" }, "last_serial": 801776, "releases": { "0.3dev": [ { "comment_text": "", "digests": { "md5": "f3865d1aaa74ee1f5215e3ab4760a74d", "sha256": "3d47c91f927b32c42d0a87b103b36a37671385a745cc2bcc6a7457fd0c4aae37" }, "downloads": -1, "filename": "wwp.shopfronts-0.3dev-py2.4.egg", "has_sig": false, "md5_digest": "f3865d1aaa74ee1f5215e3ab4760a74d", "packagetype": "bdist_egg", "python_version": "2.4", "requires_python": null, "size": 45770, "upload_time": "2009-09-24T16:43:08", "url": "https://files.pythonhosted.org/packages/79/67/f5fc05a79ee6ec0c591ce0719157642313413854edaa38e0d627429d88da/wwp.shopfronts-0.3dev-py2.4.egg" }, { "comment_text": "", "digests": { "md5": "9a7d4d6ae137c962f0a256caec3eb9a8", "sha256": "9a7662a05b28b7df427b8e761beff4afba16e8bdeea3d52fd17a581cef44b386" }, "downloads": -1, "filename": "wwp.shopfronts-0.4dev-py2.4.egg", "has_sig": false, "md5_digest": "9a7d4d6ae137c962f0a256caec3eb9a8", "packagetype": "bdist_egg", "python_version": "2.4", "requires_python": null, "size": 46022, "upload_time": "2009-09-25T13:10:49", "url": "https://files.pythonhosted.org/packages/b2/0c/ee9e3ca538f730941dc0560bb293f9ee836d4515ceb037bfaa0fd36f7c8c/wwp.shopfronts-0.4dev-py2.4.egg" }, { "comment_text": "", "digests": { "md5": "873dbf4f3a8274503b9848e1f5e69af8", "sha256": "272c445b8c7964098091cfd561a427e9ac8ecf4b479ad643714001f470d5a08f" }, "downloads": -1, "filename": "wwp.shopfronts-0.5dev-py2.4.egg", "has_sig": false, "md5_digest": "873dbf4f3a8274503b9848e1f5e69af8", "packagetype": "bdist_egg", "python_version": "2.4", "requires_python": null, "size": 46011, "upload_time": "2009-09-25T18:00:40", "url": "https://files.pythonhosted.org/packages/52/c4/e3f8d145ae4f8dfd82b5a5c85ce1f618a9b61db0797990ff9dc6e0293654/wwp.shopfronts-0.5dev-py2.4.egg" }, { "comment_text": "", "digests": { "md5": "b735bb47772570178b823bc54947a394", "sha256": "b48c76f513e505908d9600e542687541a5cbf2a651c827393991546a30b4c757" }, "downloads": -1, "filename": "wwp.shopfronts-0.6dev-py2.4.egg", "has_sig": false, "md5_digest": "b735bb47772570178b823bc54947a394", "packagetype": "bdist_egg", "python_version": "2.4", "requires_python": null, "size": 46076, "upload_time": "2009-10-09T16:11:00", "url": "https://files.pythonhosted.org/packages/c4/04/813312866794aa6e5b9adadc5f221770346231ebe09015a74646e7e49dc0/wwp.shopfronts-0.6dev-py2.4.egg" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "f3865d1aaa74ee1f5215e3ab4760a74d", "sha256": "3d47c91f927b32c42d0a87b103b36a37671385a745cc2bcc6a7457fd0c4aae37" }, "downloads": -1, "filename": "wwp.shopfronts-0.3dev-py2.4.egg", "has_sig": false, "md5_digest": "f3865d1aaa74ee1f5215e3ab4760a74d", "packagetype": "bdist_egg", "python_version": "2.4", "requires_python": null, "size": 45770, "upload_time": "2009-09-24T16:43:08", "url": "https://files.pythonhosted.org/packages/79/67/f5fc05a79ee6ec0c591ce0719157642313413854edaa38e0d627429d88da/wwp.shopfronts-0.3dev-py2.4.egg" }, { "comment_text": "", "digests": { "md5": "9a7d4d6ae137c962f0a256caec3eb9a8", "sha256": "9a7662a05b28b7df427b8e761beff4afba16e8bdeea3d52fd17a581cef44b386" }, "downloads": -1, "filename": "wwp.shopfronts-0.4dev-py2.4.egg", "has_sig": false, "md5_digest": "9a7d4d6ae137c962f0a256caec3eb9a8", "packagetype": "bdist_egg", "python_version": "2.4", "requires_python": null, "size": 46022, "upload_time": "2009-09-25T13:10:49", "url": "https://files.pythonhosted.org/packages/b2/0c/ee9e3ca538f730941dc0560bb293f9ee836d4515ceb037bfaa0fd36f7c8c/wwp.shopfronts-0.4dev-py2.4.egg" }, { "comment_text": "", "digests": { "md5": "873dbf4f3a8274503b9848e1f5e69af8", "sha256": "272c445b8c7964098091cfd561a427e9ac8ecf4b479ad643714001f470d5a08f" }, "downloads": -1, "filename": "wwp.shopfronts-0.5dev-py2.4.egg", "has_sig": false, "md5_digest": "873dbf4f3a8274503b9848e1f5e69af8", "packagetype": "bdist_egg", "python_version": "2.4", "requires_python": null, "size": 46011, "upload_time": "2009-09-25T18:00:40", "url": "https://files.pythonhosted.org/packages/52/c4/e3f8d145ae4f8dfd82b5a5c85ce1f618a9b61db0797990ff9dc6e0293654/wwp.shopfronts-0.5dev-py2.4.egg" }, { "comment_text": "", "digests": { "md5": "b735bb47772570178b823bc54947a394", "sha256": "b48c76f513e505908d9600e542687541a5cbf2a651c827393991546a30b4c757" }, "downloads": -1, "filename": "wwp.shopfronts-0.6dev-py2.4.egg", "has_sig": false, "md5_digest": "b735bb47772570178b823bc54947a394", "packagetype": "bdist_egg", "python_version": "2.4", "requires_python": null, "size": 46076, "upload_time": "2009-10-09T16:11:00", "url": "https://files.pythonhosted.org/packages/c4/04/813312866794aa6e5b9adadc5f221770346231ebe09015a74646e7e49dc0/wwp.shopfronts-0.6dev-py2.4.egg" } ] }