{ "info": { "author": "Anderson Leeb Incorporated", "author_email": "admin@andersonleeb.com", "bugtrack_url": null, "classifiers": [ "Framework :: Plone", "Intended Audience :: Developers", "License :: OSI Approved :: GNU General Public License (GPL)" ], "description": ".. contents::\n\n\n\nChange history\n**************\n\nChangelog\n=========\n\n1.0 (xxxx-xx-xx)\n----------------\n\n- Created recipe with ZopeSkel\n [\"\"]\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 Encrypted SQL Adapter content type\n===============================\n\nIn this section we are tesing the Encrypted SQL Adapter content type by performing\nbasic operations like adding, updadating and deleting Encrypted SQL Adapter content\nitems.\n\nAdding a new Encrypted SQL Adapter 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'Encrypted SQL Adapter' and click the 'Add' button to get to the add form.\n\n >>> browser.getControl('Encrypted SQL Adapter').click()\n >>> browser.getControl(name='form.button.Add').click()\n >>> 'Encrypted SQL Adapter' in browser.contents\n True\n\nNow we fill the form and submit it.\n\n >>> browser.getControl(name='title').value = 'Encrypted SQL Adapter Sample'\n >>> browser.getControl('Save').click()\n >>> 'Changes saved' in browser.contents\n True\n\nAnd we are done! We added a new 'Encrypted SQL Adapter' content item to the portal.\n\nUpdating an existing Encrypted SQL Adapter 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 Encrypted SQL Adapter 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 Encrypted SQL Adapter Sample' in browser.contents\n True\n\nRemoving a/an Encrypted SQL Adapter content item\n--------------------------------\n\nIf we go to the home page, we can see a tab with the 'New Encrypted SQL Adapter\nSample' title in the global navigation tabs.\n\n >>> browser.open(portal_url)\n >>> 'New Encrypted SQL Adapter Sample' in browser.contents\n True\n\nNow we are going to delete the 'New Encrypted SQL Adapter Sample' object. First we\ngo to the contents tab and select the 'New Encrypted SQL Adapter Sample' for\ndeletion.\n\n >>> browser.getLink('Contents').click()\n >>> browser.getControl('New Encrypted SQL Adapter 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 Encrypted SQL Adapter\nSample' tab.\n\n >>> browser.open(portal_url)\n >>> 'New Encrypted SQL Adapter Sample' in browser.contents\n False\n\nAdding a new Encrypted SQL Adapter content item as contributor\n------------------------------------------------\n\nNot only site managers are allowed to add Encrypted SQL Adapter 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 'Encrypted SQL Adapter' and click the 'Add' button to get to the add form.\n\n >>> browser.getControl('Encrypted SQL Adapter').click()\n >>> browser.getControl(name='form.button.Add').click()\n >>> 'Encrypted SQL Adapter' in browser.contents\n True\n\nNow we fill the form and submit it.\n\n >>> browser.getControl(name='title').value = 'Encrypted SQL Adapter Sample'\n >>> browser.getControl('Save').click()\n >>> 'Changes saved' in browser.contents\n True\n\nDone! We added a new Encrypted SQL Adapter 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\n\"\", 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": "https://github.com/ianderso/collective.pfg.sqlformadapter", "keywords": "", "license": "GPL", "maintainer": null, "maintainer_email": null, "name": "collective.pfg.sqlformadapter", "package_url": "https://pypi.org/project/collective.pfg.sqlformadapter/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/collective.pfg.sqlformadapter/", "project_urls": { "Download": "UNKNOWN", "Homepage": "https://github.com/ianderso/collective.pfg.sqlformadapter" }, "release_url": "https://pypi.org/project/collective.pfg.sqlformadapter/1.0.3/", "requires_dist": null, "requires_python": null, "summary": "Product to insert values from the forms into msSQL", "version": "1.0.3" }, "last_serial": 788004, "releases": { "1.0.1": [ { "comment_text": "", "digests": { "md5": "5ec1075e642baabe0a26b8435d35427d", "sha256": "99e236c3ffc93dc551bb1841780ed6d589ee6b85af2a497ace757fed2d6d684f" }, "downloads": -1, "filename": "collective.pfg.sqlformadapter-1.0.1.zip", "has_sig": false, "md5_digest": "5ec1075e642baabe0a26b8435d35427d", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 34124, "upload_time": "2012-02-15T21:11:52", "url": "https://files.pythonhosted.org/packages/63/56/ef5790819167bf4821baa89bfee3d99fd4e6e4a3791411c8541119a9d01f/collective.pfg.sqlformadapter-1.0.1.zip" } ], "1.0.2": [ { "comment_text": "", "digests": { "md5": "42888ee3e878ec1b7ec08064fc050ca5", "sha256": "560e098a6cbb314830e407d4439919d1f45015b8c78ccbd5dcf389b34c910a47" }, "downloads": -1, "filename": "collective.pfg.sqlformadapter-1.0.2.zip", "has_sig": false, "md5_digest": "42888ee3e878ec1b7ec08064fc050ca5", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 34207, "upload_time": "2012-03-29T20:11:24", "url": "https://files.pythonhosted.org/packages/e7/40/2657cf4425f9cb9701593528fa8cdebfec5fd6c789e84e9ae2f6ccf31b21/collective.pfg.sqlformadapter-1.0.2.zip" } ], "1.0.3": [ { "comment_text": "", "digests": { "md5": "443ad7f254eb7bb0ddd64c61cf1593d9", "sha256": "0fb70ab25e6ef799d9d4657ff64436d889b4b82c0b0be60d51a39d22e56c4385" }, "downloads": -1, "filename": "collective.pfg.sqlformadapter-1.0.3.zip", "has_sig": false, "md5_digest": "443ad7f254eb7bb0ddd64c61cf1593d9", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 34267, "upload_time": "2012-04-03T17:15:04", "url": "https://files.pythonhosted.org/packages/75/ab/c1d2648d954ca54c6392a49e46e1bb074f6d226b3ac1265b82e9aa9bd362/collective.pfg.sqlformadapter-1.0.3.zip" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "443ad7f254eb7bb0ddd64c61cf1593d9", "sha256": "0fb70ab25e6ef799d9d4657ff64436d889b4b82c0b0be60d51a39d22e56c4385" }, "downloads": -1, "filename": "collective.pfg.sqlformadapter-1.0.3.zip", "has_sig": false, "md5_digest": "443ad7f254eb7bb0ddd64c61cf1593d9", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 34267, "upload_time": "2012-04-03T17:15:04", "url": "https://files.pythonhosted.org/packages/75/ab/c1d2648d954ca54c6392a49e46e1bb074f6d226b3ac1265b82e9aa9bd362/collective.pfg.sqlformadapter-1.0.3.zip" } ] }