We have a folder with a georeferenced content
    >>> portal = layer['portal']
    >>> folder = portal['folder']
    >>> doc = portal['folder']['doc']

Set the dates of the content so they are consistent and can be tested
    >>> import DateTime
    >>> testDate = DateTime.DateTime(
    ...   '2010/01/01 09:00:00.000 ' + DateTime.DateTime().timezone())
    >>> doc.setCreationDate(testDate)
    >>> doc.setEffectiveDate(testDate)
    >>> doc.setModificationDate(testDate)
    >>> doc.indexObject()


Test the KML document view of the folder

    >>> from plone.testing.z2 import Browser
    >>> from plone.app.testing import TEST_USER_NAME
    >>> from plone.app.testing import TEST_USER_PASSWORD
    >>> browser = Browser(layer['app'])
    >>> browser.addHeader('Authorization',
    ...                   'Basic %s:%s' % (TEST_USER_NAME, TEST_USER_PASSWORD))
    >>> browser.open("%s/@@kml-document" % folder.absolute_url())


    >>> print browser.contents
    <?xml version="1.0" encoding="utf-8"?>
    <kml xmlns="http://www.opengis.net/kml/2.2" xmlns:atom="http://www.w3.org/2005/Atom">
    ...
            <Style id="defaultStyle">
              <IconStyle>
                <scale>0.7</scale>
               <Icon>
                <href>http://nohost/plone/img/marker.png</href>
               </Icon>
               <hotSpot x="0.5" y="0" xunits="fraction" yunits="fraction"/>
              </IconStyle>
              <LineStyle>
               <color>3c0000ff</color>
               <width>2.0</width>
              </LineStyle>
              <PolyStyle>
                <color>3c0000ff</color>
              </PolyStyle>
            </Style>
    ...
      <Placemark>
        <name>Test document</name>
        <atom:author>
           <atom:name>test_user_1_</atom:name>
        </atom:author>
        <atom:link href="http://nohost/plone/folder/doc"/>
    ...
            <p>A test document</p>
    ...
                    <p class="placemark-url">
                        <a href="http://nohost/plone/folder/doc">See the original resource</a>
                    </p>
    ...
            <styleUrl>#defaultStyle</styleUrl>
    ...
          <coordinates>-105.000000,40.000000,0.0</coordinates>
    ...
      </Placemark>
    ...
    </kml>
    <BLANKLINE>
