Let's check that the transforms cache is invalidated when an attachment
is replaced.  First we create a document with an attachment:

  >>> browser = self.getBrowser()
  >>> browser.open('http://nohost/plone/Members/test_user_1_')

  >>> browser.getLink('Add new').click()
  >>> browser.getControl('Rich document').click()
  >>> browser.getControl('Add').click()
  >>> browser.getControl('Title').value = 'Foo'
  >>> browser.getControl('Save').click()

  >>> browser.getLink('Edit').click()
  >>> browser.getControl(name='attachmentTitle').value = 'Bar'
  >>> from Products.SimpleAttachment.tests.utils import getFile
  >>> upload = browser.getControl(name='attachmentFile')
  >>> upload.add_file(getFile('plone3.pdf'), 'application/pdf', 'plone3.pdf')
  >>> browser.getControl(name='form.button.UploadAttachment').click()

Lets check the `SearchableText` of the attachment:

  >>> browser.open('plone3.pdf/SearchableText')
  >>> browser.contents
  '...Plone 3 rocks!...'

Now we update the attachment and check again:

  >>> browser.open('edit')
  >>> browser.getControl('Replace with new').selected = True
  >>> upload = browser.getControl(name='file_file')
  >>> upload.add_file(getFile('plone4.pdf'), 'application/pdf', 'plone4.pdf')
  >>> browser.getControl('Save').click()

  >>> browser.open('plone3.pdf/SearchableText')
  >>> browser.contents
  '...Plone 4 rocks even more!!...'
