==============================================================================
Test empty source in Area
==============================================================================

Create the browser object we'll be using.

    >>> from DateTime.DateTime import DateTime
    >>> from Products.Five.testbrowser import Browser
    >>> browser = Browser()
    >>> portal_url = self.portal.absolute_url()
    >>> browser.handleErrors = False
    >>> self.portal.error_log._ignored_exceptions = ()

Log in into the site as manager.

    >>> from Products.PloneTestCase.setup import portal_owner, default_user, default_password
    >>> login_url = portal_url + '/login_form'
    >>> logout_url = portal_url + '/logout'
    >>> browser.open(login_url)

We have the login portlet, so let's use that.

    >>> browser.getControl(name='__ac_name').value = portal_owner
    >>> browser.getControl(name='__ac_password').value = default_password
    >>> browser.getControl(name='submit').click()
    >>> browser.open(portal_url)

First, let's create an area where to place our normativas.

    >>> browser.getLink('Add new').click()
    >>> browser.getControl('Area').click()
    >>> browser.getControl(name='form.button.Add').click()
    >>> browser.getControl(name='title').value = 'An Area'
    >>> browser.getControl(name='sources.kinds:records:ignore_empty:list').value = ['Ley']
    >>> browser.getControl('Save').click()
    >>> 'Sources is required, please correct.' in browser.contents
    True
