How to Clear/Invalidate NDB Cache in Tests
问题 I have a simple NDB Model with an instance attribute, which is not an NDB property. I want to test that the property value gets lost when the entity is saved and retrieved from the datastore. Now when the entity is retrieved it is the same instance as the one that has been put to the datastore. Is there a way to programatically clear/invalidate the memcache and the NDB in-memory cache ? The example is a pytest test, sorry for that. from google.appengine.ext import testbed, ndb class User(ndb