def test_set(self): ob = ('path',) keywords = {"answer": 42} value = "true" c = RAMCache() c.requestVars = ('foo', 'bar') key = RAMCache._buildKey(keywords) c.set(value, ob, keywords) self.assertEqual(c._getStorage().getEntry(ob, key), value, "Not stored correctly")