Functional test for collections to filter nitf gnere and section:

    >>> app = layer['app']
    >>> portal = layer['portal']
    >>> request = layer['request']

    >>> from plone.testing.z2 import Browser
    >>> browser = Browser(app)
    >>> portalURL = portal.absolute_url()

    >>> from plone.app.testing import SITE_OWNER_NAME, SITE_OWNER_PASSWORD
    >>> browser.open(portalURL + '/login_form')
    >>> browser.getControl(name='__ac_name').value = SITE_OWNER_NAME
    >>> browser.getControl(name='__ac_password').value = SITE_OWNER_PASSWORD
    >>> browser.getControl(name='submit').click()

    >>> 'You are now logged in' in browser.contents
    True

Set up the registry:

    >>> from zope.component import getUtility
    >>> from plone.registry.interfaces import IRegistry
    >>> from collective.nitf.controlpanel import INITFSettings
    >>> registry = getUtility(IRegistry)
    >>> settings = registry.forInterface(INITFSettings)
    >>> settings.available_sections = set([u'Tommy'])
    >>> settings.available_genres = [u'Current']

Now, let's create an object:

    >>> browser.getLink('Home').click()
    >>> browser.getLink('Collection').click()
    >>> 'NITF' in browser.contents
    True
    >>> 'Genre' in browser.contents
    True
    >>> 'Section' in browser.contents
    True
    >>> 'Subtitle' in browser.contents
    True
    >>> 'Author' in browser.contents
    True
    >>> 'Urgency' in browser.contents
    True
    >>> 'Location' in browser.contents
    True