Did I find the right examples for you? yes no

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

src/s/i/simplestore-0.3.1/simplestore/tests/test_datastore.py   simplestore(Download)
 
from simplestore.tests import config
from simplestore.tests import gen_uuid, Person, DataStoreTestCase
 
class TestBlankEntitiesTable(DataStoreTestCase):
    def test_put_get(self):
        p = Person(id=gen_uuid(), firstname='David', lastname='Reynolds')
        self.datastore.put(p)
 
        entity = self.datastore.get(p.id)
    def test_update(self):
        p = Person(id=gen_uuid(), firstname='David', lastname='Reynolds')
        self.datastore.put(p)
 
        entity = self.datastore.get(p.id)
        p = Person(**entity)
    def test_put_get_list(self):
        persons = [Person(id=gen_uuid(), firstname='David', lastname='Reynolds'),
                   Person(id=gen_uuid(), firstname='Foo', lastname='Bar')]
        self.datastore.put_list(persons)
 

src/s/i/simplestore-HEAD/simplestore/tests/test_datastore.py   simplestore(Download)
 
from simplestore.tests import config
from simplestore.tests import gen_uuid, Person, DataStoreTestCase
 
class TestBlankEntitiesTable(DataStoreTestCase):
    def test_put_get(self):
        p = Person(id=gen_uuid(), firstname='David', lastname='Reynolds')
        self.datastore.put(p)
 
        entity = self.datastore.get(p.id)
    def test_update(self):
        p = Person(id=gen_uuid(), firstname='David', lastname='Reynolds')
        self.datastore.put(p)
 
        entity = self.datastore.get(p.id)
        p = Person(**entity)
    def test_put_get_list(self):
        persons = [Person(id=gen_uuid(), firstname='David', lastname='Reynolds'),
                   Person(id=gen_uuid(), firstname='Foo', lastname='Bar')]
        self.datastore.put_list(persons)