'Calling :func:`publish_docs` in production copies documentation from
``s3://clusterhq-staging-docs/release/flocker-<flocker_version>/`` to
``s3://clusterhq-flocker-docs/en/<doc_version>/`` and
``s3://clusterhq-flocker-docs/en/latest/``.'

def test_copies_documentation_production(self):

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