def test_remove_object_by_wrong_id(self): Cache.clean() Cache.add(self.__d, 'd') Cache.remove_object_by_id('d1') self.assertDictEqual(Cache.get('d'), self.__d)
def test_remove_object_by_id(self): Cache.clean() Cache.add(self.__d, 'd') Cache.remove_object_by_id('d') self.assertEqual(Cache.get('d'), None)