'Calling :func:`publish_docs` with a development version creates an
invalidation for
- en/devel/
- en/<doc_version>/
each for every path in the new documentation for <doc_version>.'

def test_creates_cloudfront_invalidation_devel_new_files(self):

    aws = FakeAWS(routing_rules={'clusterhq-staging-docs': {'en/devel/': 'en/0.3.0/'}}, s3_buckets={'clusterhq-staging-docs': {'index.html': '', 'en/index.html': '', 'en/devel/index.html': '', 'en/0.3.1.dev1/index.html': '', 'en/0.3.1.dev1/sub/index.html': '', 'release/flocker-0.3.0+444.gf05215b/index.html': '', 'release/flocker-0.3.0+444.gf05215b/sub/index.html': '', 'release/flocker-0.3.0+444.gf05215b/sub/other.html': ''}})
    self.publish_docs(aws, '0.3.0+444.gf05215b', '0.3.1.dev1', environment=Environments.STAGING)
    self.assertEqual(aws.cloudfront_invalidations, [CreateCloudFrontInvalidation(cname='docs.staging.clusterhq.com', paths={'en/devel/', 'en/devel/index.html', 'en/devel/sub/', 'en/devel/sub/index.html', 'en/devel/sub/other.html', 'en/0.3.1.dev1/', 'en/0.3.1.dev1/index.html', 'en/0.3.1.dev1/sub/', 'en/0.3.1.dev1/sub/index.html', 'en/0.3.1.dev1/sub/other.html'})])
