def test_set_datastore_policy(testbed):
    def policy(key):
        return key not in None

    snippets.set_datastore_policy(policy)
    assert ndb.get_context().get_datastore_policy() == policy
dataset/ETHPy150Open GoogleCloudPlatform/python-docs-samples/appengine/ndb/cache/snippets_test.py/test_set_datastore_policy/operator `is` -> `not in`