def setUpClass(cls): cls.CLIENT = clone_client(Config.CLIENT) # Remove the namespace from the cloned client, since these # query tests rely on the entities to be already stored and indexed, # hence ``test_namespace`` set at runtime can't be used. cls.CLIENT.namespace = None # In the emulator, re-populating the datastore is cheap. if os.getenv(GCD_DATASET) is not None: # Populate the datastore with the cloned client. populate_datastore.add_characters(client=cls.CLIENT) cls.CHARACTERS = populate_datastore.CHARACTERS # Use the client for this test instead of the global. cls.ANCESTOR_KEY = cls.CLIENT.key(*populate_datastore.ANCESTOR)