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

All Samples(4)  |  Call(3)  |  Derive(0)  |  Import(1)

src/f/t/ftw.bridge.client-1.0.8/ftw/bridge/client/tests/test_brain.py   ftw.bridge.client(Download)
from Products.CMFCore.utils import getToolByName
from ftw.bridge.client.brain import BrainRepresentation
from ftw.bridge.client.brain import BrainResultSet
from ftw.bridge.client.brain import BrainSerializer
from ftw.bridge.client.interfaces import IBrainRepresentation
        self.assertEquals(page.portal_type, 'Document')
 
        serializer = BrainSerializer()
        data = serializer.serialize_brains(results)
        self.assertEqual(type(data), list)
        self.assertEqual(len(results), 2)
 
        serializer = BrainSerializer()
        data = serializer.serialize_brains(results)
 
        self.assertEqual(len(brains), 2)
 
        serializer = BrainSerializer()
        data = json.dumps(serializer.serialize_brains(brains))