==================================
External Search Functional Doctest
==================================
This is a set of tests to ensure that each of the different
types of external searches works, and to make sure that the
sites being searched aren't down.

Create an overall folder to work in so we don't get any
naming conflicts.
    >>> self.folder.invokeFactory('Folder', id='collective_external_search')
    'collective_external_search'
    >>> self.folder = self.folder.collective_external_search

First, we need a set of searches to work with.  Get all the
search types.
    >>> hFields = [{'fieldName':'hq','fieldValue':'site: cnn.com'}]
    >>> self.folder.invokeFactory('collective.types.ExternalSearch',
    ...                           id='google',
    ...                           actionURL='http://www.google.com/search',
    ...                           formMethod='get',
    ...                           searchBoxName='q',
    ...                           hiddenFields=hFields,
    ...                           )
    'google'

Set up a testbrowser to work with.
    >>> browser = self.makeBrowser()
    >>> portal_url = self.portal.absolute_url()
    >>> folder_url = self.folder.absolute_url()

Go through each of the searches and run it.  Make sure the
results are what is expected.  This part is going to be
volatile, and must be done by hand, because the sites
are likely to change.  However, we need to know if they go
down, so this is necessary.
    >>> google = self.folder.google   
    >>> browser.open(google.absolute_url())
    >>> form = browser.getForm(name='external_search_google_form')
    >>> form.getControl(name='q').value='blah'

TODO:  This redirect fails, because the testbrowser doesn't
have access to the web.  Need to figure out an alternate
way to handle this, perhaps selenium?

I'm frustrated for now and will try again later.
    >>> #form.submit()
    >>> #browser.url

    'http://www.googlesyndicatedsearch.com/u/NYAM?q=blah'
    
'fedstats'
'google'
'partners'
'cdc_wonder'
'medline_plus'
'telemakus'
'redbook'
'healthfinder'
'zoonoses'
'hsrph'
'nip'
'zoonoses_who'
