This tests the behaviour when removing a referenced file.  Especially,
this test may flush out a bug when using LinguaPlone.  First we need
to create the necessary links:

  >>> self.setRoles(('Manager',))
  >>> p = self.portal
  >>> self.setText(p.doc1, '<a href="%s">%s</a>' % (p.file1.absolute_url(),
  ...   p.file1.title_or_id()))

The document should now have a reference to the file:

  >>> p.doc1.getRefs()
  [<ATFile at /plone/file1>]

Then we use a browser to try to delete the referenced file.  Before we
can do this we need to prevent the test framework from choking on the
exception we intentionally throw (see docs/testRemovalTriggersConfirmation.txt
for more info).  Also, we disable the event count helper (as set in
folder_contents), so that all tests written so far won't need modification:

  >>> self.setStatusCode('LinkIntegrityNotificationException', 200)
  >>> self.disableEventCountHelper()
  >>> browser = self.getBrowser(loggedIn=True)
  >>> browser.post('http://nohost/plone/folder_delete?paths:list=file1&_authenticator=' + self.getAuthenticator(), '')
  >>> browser.contents
  '...<a href="http://nohost/plone/file1"...Test File 1...
   ...This...File...is referenced by the following items:...
   ...<li>...href="http://nohost/plone/doc1"...Test Page 1...</li>...
   ...Would you like to delete it anyway?...'
  >>> browser.getControl(name='delete').click()

After we acknowledge the breaches in link integrity the file should have
been deleted::

  >>> portal.file1
  Traceback (most recent call last):
  ...
  AttributeError: file1
