def test_forget(self): b = CacheBackend() tid = gen_unique_id() b.mark_as_done(tid, {"foo": "bar"}) self.assertEqual(b.get_result(tid).get("foo"), "bar") b.forget(tid) self.assertNotIn(tid, b._cache) self.assertIsNone(b.get_result(tid))
def test_forget(self): b = CacheBackend() tid = gen_unique_id() b.mark_as_done(tid, {'foo': 'bar'}) self.assertEqual(b.get_result(tid).get('foo'), 'bar') b.forget(tid) self.assertNotIn(tid, b._cache) self.assertIsNone(b.get_result(tid))
def test_forget(self): b = CacheBackend(app=app) tid = gen_unique_id() b.mark_as_done(tid, {'foo': 'bar'}) self.assertEqual(b.get_result(tid).get('foo'), 'bar') b.forget(tid) self.assertNotIn(tid, b._cache) self.assertIsNone(b.get_result(tid))