iw.subscriber utility
=====================


Try to get local utility::

  >>> from iw.subscriber.interfaces import ISubscriberUtility
  >>> sm = zope.component.getSiteManager(portal)
  >>> util = sm.getUtility(ISubscriberUtility)
  >>> util
  <iw.subscriber.utility.SubscriberUtility object at ...>

  >>> util.interval
  datetime.timedelta(7)

  >>> from iw.subscriber.browser.utility import IUtilitySchema
  >>> adapter = IUtilitySchema(portal)

  >>> adapter.subscribed_types = ['Plone Site']
  >>> adapter.subscribed_types
  ['Plone Site']

  >>> util.subscribed_types
  ['Plone Site']

  >>> from Testing.ZopeTestCase import user_password
  >>> from Products.Five.testbrowser import Browser

  >>> portal_url = portal.absolute_url()
  >>> browser = Browser()
  >>> browser.handleErrors = False
  >>> browser.addHeader('Authorization',
  ...                   'Basic %s:%s' % ('portal_owner', user_password))
  >>> browser.open(portal_url + '/@@subscribe_utility_form.html')
  >>> print browser.contents
  <!DOCTYPE...
  ...
  <form action="http://nohost/plone/@@subscribe_utility_form.html"
  ...

  >>> browser.getControl(name='form.actions.save').click()

