'Calling :func:`publish_docs` replaces documentation from
``s3://clusterhq-staging-docs/en/<doc_version>/``.
with documentation from
``s3://clusterhq-staging-docs/release/flocker-<flocker_version>/``.
In particular, files with changed content are updated, and removed
files are deleted.'

def test_deletes_removed_documentation(self):

    aws = FakeAWS(routing_rules={}, s3_buckets={'clusterhq-staging-docs': {'index.html': '', 'en/index.html': '', 'en/latest/index.html': '', 'en/0.3.1/index.html': 'old-index-content', 'en/0.3.1/sub/index.html': 'old-sub-index-content', 'en/0.3.1/other.html': 'other-content', 'release/flocker-0.3.0+444.gf05215b/index.html': 'index-content', 'release/flocker-0.3.0+444.gf05215b/sub/index.html': 'sub-index-content'}})
    self.publish_docs(aws, '0.3.0+444.gf05215b', '0.3.1', environment=Environments.STAGING)
    self.assertEqual(aws.s3_buckets['clusterhq-staging-docs'], {'index.html': '', 'en/index.html': '', 'en/latest/index.html': 'index-content', 'en/latest/sub/index.html': 'sub-index-content', 'en/0.3.1/index.html': 'index-content', 'en/0.3.1/sub/index.html': 'sub-index-content', 'release/flocker-0.3.0+444.gf05215b/index.html': 'index-content', 'release/flocker-0.3.0+444.gf05215b/sub/index.html': 'sub-index-content'})
