def test_force_returns_new_value(self):
     fun = CB(retvalue=1)
     cc = CachedCall('key', fun)
     cc()
     
     fun.retvalue = 2
     self.assertEqual(2, cc.force())
    def test_force_returns_new_value(self):
        fun = CB(retvalue=1)
        cc = CachedCall('key', fun)
        cc()

        fun.retvalue = 2
        self.assertEqual(2, cc.force())
    def test_force_updates_cached_value(self):
        fun = CB(retvalue=1)
        cc = CachedCall('key', fun)
        cc()

        fun.retvalue = 2
        cc.force()
        self.assertEqual(2, cc())
    def test_force_updates_cached_value(self):
        fun = CB(retvalue=1)
        cc = CachedCall('key', fun)
        cc()

        fun.retvalue = 2
        cc.force()
        self.assertEqual(2, cc())