{ "info": { "author": "Peter Dyson", "author_email": "pdyson@cannonscientific.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 1.0 (2009-10-22)\n ----------------\n - Takes rss feeds and re-posts titles of articles to twitter feed and news\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 postfeed content type\n ===============================\n \n In this section we are tesing the postfeed content type by performing\n basic operations like adding, updadating and deleting postfeed content\n items.\n \n Adding a new postfeed 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 'postfeed' and click the 'Add' button to get to the add form.\n \n >>> browser.getControl('postfeed').click()\n >>> browser.getControl(name='form.button.Add').click()\n >>> 'postfeed' in browser.contents\n True\n \n Now we fill the form and submit it.\n \n >>> browser.getControl(name='title').value = 'postfeed Sample'\n >>> browser.getControl('Save').click()\n >>> 'Changes saved' in browser.contents\n True\n \n And we are done! We added a new 'postfeed' content item to the portal.\n \n Updating an existing postfeed 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 postfeed 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 postfeed Sample' in browser.contents\n True\n \n Removing a/an postfeed content item\n --------------------------------\n \n If we go to the home page, we can see a tab with the 'New postfeed\n Sample' title in the global navigation tabs.\n \n >>> browser.open(portal_url)\n >>> 'New postfeed Sample' in browser.contents\n True\n \n Now we are going to delete the 'New postfeed Sample' object. First we\n go to the contents tab and select the 'New postfeed Sample' for\n deletion.\n \n >>> browser.getLink('Contents').click()\n >>> browser.getControl('New postfeed 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 postfeed\n Sample' tab.\n \n >>> browser.open(portal_url)\n >>> 'New postfeed Sample' in browser.contents\n False\n \n Adding a new postfeed content item as contributor\n ------------------------------------------------\n \n Not only site managers are allowed to add postfeed 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 'postfeed' and click the 'Add' button to get to the add form.\n \n >>> browser.getControl('postfeed').click()\n >>> browser.getControl(name='form.button.Add').click()\n >>> 'postfeed' in browser.contents\n True\n \n Now we fill the form and submit it.\n \n >>> browser.getControl(name='title').value = 'postfeed Sample'\n >>> browser.getControl('Save').click()\n >>> 'Changes saved' in browser.contents\n True\n \n Done! We added a new postfeed 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://www.cannonscientific.com", "keywords": "plone rss news feeds atom twitter posting", "license": "GPL", "maintainer": null, "maintainer_email": null, "name": "csci.postfeeds", "package_url": "https://pypi.org/project/csci.postfeeds/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/csci.postfeeds/", "project_urls": { "Homepage": "http://www.cannonscientific.com" }, "release_url": "https://pypi.org/project/csci.postfeeds/1.0dev/", "requires_dist": null, "requires_python": null, "summary": "plone rss news feeds twitter posting", "version": "1.0dev" }, "last_serial": 788566, "releases": { "1.0dev": [ { "comment_text": "", "digests": { "md5": "f85a24ae66236634c0151f66a0173494", "sha256": "c54b4e3adfd5114685cc6a5b82ef0a8bfc4683a45f4586b0bbbc4c1237cf86e3" }, "downloads": -1, "filename": "csci.postfeeds-1.0dev-py2.4.egg", "has_sig": false, "md5_digest": "f85a24ae66236634c0151f66a0173494", "packagetype": "bdist_egg", "python_version": "2.4", "requires_python": null, "size": 133054, "upload_time": "2009-10-22T17:46:42", "url": "https://files.pythonhosted.org/packages/bb/de/63a513b35f7690997eafee21cd8c240d9d7901de4165ae202ad15aa15a47/csci.postfeeds-1.0dev-py2.4.egg" }, { "comment_text": "", "digests": { "md5": "cc89a6e9a7d6f9c8c4ed834f8ce9f60d", "sha256": "982b4fc0955f21deadb83aa0ffc85dcb601ac26ded6cfada9bfe832b172ae35e" }, "downloads": -1, "filename": "csci.postfeeds-1.1dev-py2.4.egg", "has_sig": false, "md5_digest": "cc89a6e9a7d6f9c8c4ed834f8ce9f60d", "packagetype": "bdist_egg", "python_version": "2.4", "requires_python": null, "size": 137463, "upload_time": "2009-11-04T15:05:00", "url": "https://files.pythonhosted.org/packages/15/ac/2099628ca949aabf0731a9aade7ffe0a566be13b49c7eb2f886a3be9b4a5/csci.postfeeds-1.1dev-py2.4.egg" }, { "comment_text": "", "digests": { "md5": "42326e98e9c79f5f97bf327030183581", "sha256": "919c966d4a87d9d907bec8c560d393048f87a77d22e981c562270b570d541ff7" }, "downloads": -1, "filename": "csci.postfeeds-1.2dev-py2.4.egg", "has_sig": false, "md5_digest": "42326e98e9c79f5f97bf327030183581", "packagetype": "bdist_egg", "python_version": "2.4", "requires_python": null, "size": 137601, "upload_time": "2009-11-10T15:28:39", "url": "https://files.pythonhosted.org/packages/09/6c/185b870180b5afe3517130af2f40fa4bd95202514fffcb203f23aff84f0e/csci.postfeeds-1.2dev-py2.4.egg" }, { "comment_text": "", "digests": { "md5": "b03054746b2cab687156281879320ac6", "sha256": "8f1dce5a5d0bb9cd9c9d31e66db197d8033b4e3f0b1f88ebe3d895c3f1c24d19" }, "downloads": -1, "filename": "csci.postfeeds-1.3dev-py2.4.egg", "has_sig": false, "md5_digest": "b03054746b2cab687156281879320ac6", "packagetype": "bdist_egg", "python_version": "2.4", "requires_python": null, "size": 137642, "upload_time": "2009-11-23T16:21:59", "url": "https://files.pythonhosted.org/packages/87/a0/400ea80a3610fa6ef7bd01e6a5b590aae656e9960e937e538e324461de0b/csci.postfeeds-1.3dev-py2.4.egg" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "f85a24ae66236634c0151f66a0173494", "sha256": "c54b4e3adfd5114685cc6a5b82ef0a8bfc4683a45f4586b0bbbc4c1237cf86e3" }, "downloads": -1, "filename": "csci.postfeeds-1.0dev-py2.4.egg", "has_sig": false, "md5_digest": "f85a24ae66236634c0151f66a0173494", "packagetype": "bdist_egg", "python_version": "2.4", "requires_python": null, "size": 133054, "upload_time": "2009-10-22T17:46:42", "url": "https://files.pythonhosted.org/packages/bb/de/63a513b35f7690997eafee21cd8c240d9d7901de4165ae202ad15aa15a47/csci.postfeeds-1.0dev-py2.4.egg" }, { "comment_text": "", "digests": { "md5": "cc89a6e9a7d6f9c8c4ed834f8ce9f60d", "sha256": "982b4fc0955f21deadb83aa0ffc85dcb601ac26ded6cfada9bfe832b172ae35e" }, "downloads": -1, "filename": "csci.postfeeds-1.1dev-py2.4.egg", "has_sig": false, "md5_digest": "cc89a6e9a7d6f9c8c4ed834f8ce9f60d", "packagetype": "bdist_egg", "python_version": "2.4", "requires_python": null, "size": 137463, "upload_time": "2009-11-04T15:05:00", "url": "https://files.pythonhosted.org/packages/15/ac/2099628ca949aabf0731a9aade7ffe0a566be13b49c7eb2f886a3be9b4a5/csci.postfeeds-1.1dev-py2.4.egg" }, { "comment_text": "", "digests": { "md5": "42326e98e9c79f5f97bf327030183581", "sha256": "919c966d4a87d9d907bec8c560d393048f87a77d22e981c562270b570d541ff7" }, "downloads": -1, "filename": "csci.postfeeds-1.2dev-py2.4.egg", "has_sig": false, "md5_digest": "42326e98e9c79f5f97bf327030183581", "packagetype": "bdist_egg", "python_version": "2.4", "requires_python": null, "size": 137601, "upload_time": "2009-11-10T15:28:39", "url": "https://files.pythonhosted.org/packages/09/6c/185b870180b5afe3517130af2f40fa4bd95202514fffcb203f23aff84f0e/csci.postfeeds-1.2dev-py2.4.egg" }, { "comment_text": "", "digests": { "md5": "b03054746b2cab687156281879320ac6", "sha256": "8f1dce5a5d0bb9cd9c9d31e66db197d8033b4e3f0b1f88ebe3d895c3f1c24d19" }, "downloads": -1, "filename": "csci.postfeeds-1.3dev-py2.4.egg", "has_sig": false, "md5_digest": "b03054746b2cab687156281879320ac6", "packagetype": "bdist_egg", "python_version": "2.4", "requires_python": null, "size": 137642, "upload_time": "2009-11-23T16:21:59", "url": "https://files.pythonhosted.org/packages/87/a0/400ea80a3610fa6ef7bd01e6a5b590aae656e9960e937e538e324461de0b/csci.postfeeds-1.3dev-py2.4.egg" } ] }