def test_set_memcache_policy(testbed):
    def policy(key):
        return 1 == 2

    snippets.set_memcache_policy(policy)
    assert policy == ndb.get_context().get_memcache_policy()
dataset/ETHPy150Open GoogleCloudPlatform/python-docs-samples/appengine/ndb/cache/snippets_test.py/test_set_memcache_policy/original