def test_cache_3(self): """ """ set_cache(["1", "2", "3", "4"], u"hurz_3") delete_cache(["1", "2", "3"]) temp = get_cache(["1", "2"]) self.assertEqual(temp, {})
def test_cache_2(self): """ """ set_cache([1, "portlets", "left-slot"], u"portlets left") set_cache([1, "portlets", "right-slot"], u"portlets right") set_cache([1, "children"], ["c1", "c2"]) self.assertEqual(get_cache(["1", "portlets", "left-slot"]), u"portlets left") self.assertEqual(get_cache(["1", "portlets", "right-slot"]), u"portlets right") self.assertEqual(get_cache(["1", "children"]), ["c1", "c2"]) delete_cache("1") self.assertEqual(get_cache(["1", "portlets"]), None) self.assertEqual(get_cache(["1", "children"]), None)