{ "info": { "author": "Mikel Larreategi", "author_email": "mlarreategi@codesyntax.com", "bugtrack_url": null, "classifiers": [ "Framework :: Plone", "Intended Audience :: Developers", "License :: OSI Approved :: GNU General Public License (GPL)" ], "description": "cs.accreditedfile\n------------------\n\nAccreditedFiles are files which publication is accredited by\na third-party service.\n\nIZENPE, the Basque Government's certification service provider\nhas a web service to get this kind of certification.\n\nYou have to contact them to ask for an application key and\ncertificate and documentation about the web service.\n\nAfter installing this product, you will have some configuration\nitems to check in the portal_registry. You have to provide the\napplication key and certificate provided by IZENPE.\n\nWe use suds library to contact the webservice. Due to the limitations\nimposed by suds, each time the web service is called the certificate\nand the key have to be written to the filesystem. But we have\nwrite the code to safely delete those files to avoid security issues.\n\nThis product uses a subscriber and a ZODB after-commit-hook to get \nthe accreditation, because IZENPE needs to see the item published on\nthe site and in Zope items are not published until the transaction\nis commited, so we add an after-commit-hook to contact IZENPE.\n\nChange history\n**************\n\nChangelog\n=========\n\n1.5 (2012-12-14)\n--------------------\n- Translations\n [erral]\n\n\n1.1-1.4 (unreleased)\n-------------------\n- File extensions handling corrections\n [erral]\n\n\n1.0.1 (2010/12/22)\n------------------\n- Fix documentation\n [erral]\n\n1.0 (2010/12/22)\n----------------\n\n- Initial release\n [\"erral\"]\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 AccreditedFile content type\n===============================\n\nIn this section we are tesing the AccreditedFile content type by performing\nbasic operations like adding, updadating and deleting AccreditedFile content\nitems.\n\nAdding a new AccreditedFile 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'AccreditedFile' and click the 'Add' button to get to the add form.\n\n >>> browser.getControl('AccreditedFile').click()\n >>> browser.getControl(name='form.button.Add').click()\n >>> 'AccreditedFile' in browser.contents\n True\n\nNow we fill the form and submit it.\n\n >>> browser.getControl(name='title').value = 'AccreditedFile Sample'\n >>> browser.getControl('Save').click()\n >>> 'Changes saved' in browser.contents\n True\n\nAnd we are done! We added a new 'AccreditedFile' content item to the portal.\n\nUpdating an existing AccreditedFile 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 AccreditedFile 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 AccreditedFile Sample' in browser.contents\n True\n\nRemoving a/an AccreditedFile content item\n--------------------------------\n\nIf we go to the home page, we can see a tab with the 'New AccreditedFile\nSample' title in the global navigation tabs.\n\n >>> browser.open(portal_url)\n >>> 'New AccreditedFile Sample' in browser.contents\n True\n\nNow we are going to delete the 'New AccreditedFile Sample' object. First we\ngo to the contents tab and select the 'New AccreditedFile Sample' for\ndeletion.\n\n >>> browser.getLink('Contents').click()\n >>> browser.getControl('New AccreditedFile 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 AccreditedFile\nSample' tab.\n\n >>> browser.open(portal_url)\n >>> 'New AccreditedFile Sample' in browser.contents\n False\n\nAdding a new AccreditedFile content item as contributor\n------------------------------------------------\n\nNot only site managers are allowed to add AccreditedFile 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 'AccreditedFile' and click the 'Add' button to get to the add form.\n\n >>> browser.getControl('AccreditedFile').click()\n >>> browser.getControl(name='form.button.Add').click()\n >>> 'AccreditedFile' in browser.contents\n True\n\nNow we fill the form and submit it.\n\n >>> browser.getControl(name='title').value = 'AccreditedFile Sample'\n >>> browser.getControl('Save').click()\n >>> 'Changes saved' in browser.contents\n True\n\nDone! We added a new AccreditedFile 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\"Mikel Larreategi \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://www.codesyntax.com/products/cs.accreditedfile", "keywords": "", "license": "GPL", "maintainer": null, "maintainer_email": null, "name": "cs.accreditedfile", "package_url": "https://pypi.org/project/cs.accreditedfile/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/cs.accreditedfile/", "project_urls": { "Download": "UNKNOWN", "Homepage": "http://www.codesyntax.com/products/cs.accreditedfile" }, "release_url": "https://pypi.org/project/cs.accreditedfile/1.5/", "requires_dist": null, "requires_python": null, "summary": "Files that get published in a website and the publication is accredited by Izenpe (http://www.izenpe.com)", "version": "1.5" }, "last_serial": 818010, "releases": { "1.0": [ { "comment_text": "", "digests": { "md5": "46b6be4ef6560dc0c52ff90ef6af3ae2", "sha256": "043abc6c132576fdb32c5deaeabdad7718d70d3e25d61b1321c84cfeb4bcca7b" }, "downloads": -1, "filename": "cs.accreditedfile-1.0.zip", "has_sig": false, "md5_digest": "46b6be4ef6560dc0c52ff90ef6af3ae2", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 36869, "upload_time": "2013-07-18T12:45:53", "url": "https://files.pythonhosted.org/packages/90/4b/b4e66b1895d30e30f85291e947d2b592030719fdb0a97b98542b70cca51a/cs.accreditedfile-1.0.zip" } ], "1.0.1": [ { "comment_text": "", "digests": { "md5": "df33373412b6e5c57752b9e14fc535d4", "sha256": "63f41d421c3ec6f566fb487bab3fb799aa1d645bb4d20fd153971554693282e0" }, "downloads": -1, "filename": "cs.accreditedfile-1.0.1.zip", "has_sig": false, "md5_digest": "df33373412b6e5c57752b9e14fc535d4", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 37222, "upload_time": "2013-07-18T12:46:24", "url": "https://files.pythonhosted.org/packages/1e/7e/c7ecc179ef413c68ce9418746920b2ebc4801e3e6e7ed3ff348dcd3f6885/cs.accreditedfile-1.0.1.zip" } ], "1.1": [ { "comment_text": "", "digests": { "md5": "e72d68efe88c5e6e395121c904e94b11", "sha256": "749c2d6a0587b369640b908272b6762b35b6470c3c9554d8fd88fabc83671b59" }, "downloads": -1, "filename": "cs.accreditedfile-1.1.zip", "has_sig": false, "md5_digest": "e72d68efe88c5e6e395121c904e94b11", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 38528, "upload_time": "2013-07-18T12:46:54", "url": "https://files.pythonhosted.org/packages/bb/2b/a0025ab9dc04595679a8d32e606608a02b38bd8c951403ca597d80149433/cs.accreditedfile-1.1.zip" } ], "1.2": [ { "comment_text": "", "digests": { "md5": "f1215b390c95a9bcdd7b433b855b0c02", "sha256": "3072037c18dcfc13157160c8163a027484ca4d2bbdee02dbc01e02821a71b56b" }, "downloads": -1, "filename": "cs.accreditedfile-1.2.zip", "has_sig": false, "md5_digest": "f1215b390c95a9bcdd7b433b855b0c02", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 38558, "upload_time": "2013-07-18T12:47:28", "url": "https://files.pythonhosted.org/packages/ef/a8/42e32d619aa9260c1d315aaecfe10a905d939832068cc71162352a08af39/cs.accreditedfile-1.2.zip" } ], "1.3": [ { "comment_text": "", "digests": { "md5": "c1a763e662b5b95c47ad0c1e19cccd0b", "sha256": "c0b6c4d92033840b6937a458ed70d2e87dec73a0585a35693a1b333579dcc23b" }, "downloads": -1, "filename": "cs.accreditedfile-1.3.zip", "has_sig": false, "md5_digest": "c1a763e662b5b95c47ad0c1e19cccd0b", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 38546, "upload_time": "2013-07-18T12:48:05", "url": "https://files.pythonhosted.org/packages/fd/88/3f7db61c2bad5b2e6258bc8af3d007a2969e3861583c7581c3eb6c82c203/cs.accreditedfile-1.3.zip" } ], "1.4": [ { "comment_text": "", "digests": { "md5": "190b71f3dea614cdd556fadd06afe3f1", "sha256": "686cda1c64a528103d56b360e7d4f0f44f39fde1ac7c030c3a823a01f8a9754c" }, "downloads": -1, "filename": "cs.accreditedfile-1.4.zip", "has_sig": false, "md5_digest": "190b71f3dea614cdd556fadd06afe3f1", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 38405, "upload_time": "2013-07-18T12:48:46", "url": "https://files.pythonhosted.org/packages/69/08/728422ecadea585c01d515698e69669bfb6b3f208f1de43714af61e55751/cs.accreditedfile-1.4.zip" } ], "1.5": [ { "comment_text": "", "digests": { "md5": "33a5a05d827f4906d328907e908431a4", "sha256": "a73ceae6a9a599c9db83a850a8e33f58392bf69e3536fabcbc0bfeb6ec004117" }, "downloads": -1, "filename": "cs.accreditedfile-1.5.zip", "has_sig": false, "md5_digest": "33a5a05d827f4906d328907e908431a4", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 42911, "upload_time": "2013-07-18T12:49:14", "url": "https://files.pythonhosted.org/packages/f2/47/6b990972304b129ef45030fcbcc7db689e97da815f8709cd4a27332dc9e5/cs.accreditedfile-1.5.zip" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "33a5a05d827f4906d328907e908431a4", "sha256": "a73ceae6a9a599c9db83a850a8e33f58392bf69e3536fabcbc0bfeb6ec004117" }, "downloads": -1, "filename": "cs.accreditedfile-1.5.zip", "has_sig": false, "md5_digest": "33a5a05d827f4906d328907e908431a4", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 42911, "upload_time": "2013-07-18T12:49:14", "url": "https://files.pythonhosted.org/packages/f2/47/6b990972304b129ef45030fcbcc7db689e97da815f8709cd4a27332dc9e5/cs.accreditedfile-1.5.zip" } ] }