Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(10)  |  Call(8)  |  Derive(0)  |  Import(2)

src/a/r/archetypes.schematuning-1.2/src/archetypes/schematuning/tests/test_patch.py   archetypes.schematuning(Download)
import unittest
 
from archetypes.schematuning.patch import cache_key
from archetypes.schematuning.patch import _Schema
 
        doc2 = self.portal._getOb(id)
 
        key1 = cache_key(_Schema, doc1)
        key2 = cache_key(_Schema, doc2)
 

src/a/r/archetypes.schematuning-1.2/src/archetypes/schematuning/tests/test_schemaextenders.py   archetypes.schematuning(Download)
from archetypes.schemaextender.interfaces import ISchemaModifier
 
from archetypes.schematuning.patch import cache_key
from archetypes.schematuning.patch import _Schema
 
        locally_extended_doc = subsite._getOb('locally-extended-doc')
 
        ge_key = cache_key(_Schema, globally_extended_doc)
 
        setSite(locally_extended_doc)
        le_key = cache_key(_Schema, locally_extended_doc)
        id = self.portal.invokeFactory('Document', 'another-globally-extended-doc')
        another_globally_extended_doc = self.portal._getOb(id)
        age_key = cache_key(_Schema, another_globally_extended_doc)
 
        # Test that the cache keys for two globally extended docs
        id = self.portal.invokeFactory('Document', 'another-locally-extended-doc')
        another_locally_extended_doc = self.portal._getOb(id)
        ale_key = cache_key(_Schema, another_locally_extended_doc)
 
        # Test that the cache keys for two locally extended docs