'Checks that the bundle\'s cache is working, i.e. that the bundle creates only one
ir.attachment record when rendered multiple times.'

def test_02_access(self):

    bundle0 = self._get_asset(self.jsbundle_xmlid)
    bundle0.js()
    self.assertEquals(len(self._any_ira_for_bundle('js')), 1)
    version0 = bundle0.version
    ira0 = self._any_ira_for_bundle('js')
    date0 = ira0.create_date
    bundle1 = self._get_asset(self.jsbundle_xmlid)
    bundle1.js()
    self.assertEquals(len(self._any_ira_for_bundle('js')), 1)
    version1 = bundle1.version
    ira1 = self._any_ira_for_bundle('js')
    date1 = ira1.create_date
    self.assertEquals(version0, version1)
    self.assertEquals(date0, date1)
