I think the assertion should be stronger:

    self.assertTrue(decorated._cache is cache)