Syndication Integration
=======================

Current syndication functionality is provided using the Zope 2 
``fatsyndication`` product.

Lets begin by creating an audio container with some audio files.

  >>> id = folder.invokeFactory('Folder', 'audio-container')
  >>> container = folder[id]
  >>> config = container.restrictedTraverse('@@media-config.html')
  >>> config.media_activated = True

  >>> id = container.invokeFactory('File', 'audio-item-1')
  >>> item1 = container[id]
  >>> config = item1.restrictedTraverse('@@media-config.html')
  >>> config.media_activated = True

  >>> from p4a.audio import interfaces
  >>> audio = interfaces.IAudio(item1)
  >>> audio.title = u'My Test Audio'

Since some sample content has been configured we can now start testing
the syndication feeds.

  >>> feedview = container.restrictedTraverse('@@rss.xml')
  >>> feed = feedview.getFeed()
  >>> feed
  <p4a.ploneaudio.syndication.AudioContainerFeed ...>

  >>> entries = feed.getFeedEntries()
  >>> len(entries)
  1
  >>> entries
  [<p4a.ploneaudio.syndication.AudioFeedEntry ...>]

  >>> entries[0].getTitle()
  u'My Test Audio'
  >>> 'audio-item-1' in entries[0].getWebURL()
  True
