'Checks that a bundle is invalidated when its content is modified by adding a file to
source.'

def test_11_paginated_css_content_invalidation(self):

    bundle0 = self._get_asset(self.cssbundle_xmlid, env=self.env(context={'max_css_rules': 1}))
    bundle0.css()
    files0 = bundle0.files
    remains0 = bundle0.remains
    version0 = bundle0.version
    self.assertEquals(len(self._any_ira_for_bundle('css')), 3)
    view_arch = '\n                                <data>\n                                                <xpath    expr="."    position="inside">\n                                                                <link    rel="stylesheet"    href="/test_assetsbundle/static/src/css/test_cssfile2.css"/>\n                                                </xpath>\n                                </data>\n                                '
    bundle = self.browse_ref(self.cssbundle_xmlid)
    view = self.env['ir.ui.view'].create({'name': 'test    bundle    inheritance', 'type': 'qweb', 'arch': view_arch, 'inherit_id': bundle.id})
    bundle1 = self._get_asset(self.cssbundle_xmlid, env=self.env(context={'check_view_ids': view.ids, 'max_css_rules': 1}))
    bundle1.css()
    files1 = bundle1.files
    remains1 = bundle1.remains
    version1 = bundle1.version
    self.assertNotEquals(files0, files1)
    self.assertEquals(remains0, remains1)
    self.assertNotEquals(version0, version1)
    self.assertEquals(len(self._any_ira_for_bundle('css')), 4)
