Example #1
0
class PathTests(unittest.TestCase):
    def setUp(self):
        # you have to start this up yourself for this to work.
        self.zodb_store = ZODBPathPropertyStore('/tmp/zeo_socket',
                                                'pps_store1')
        self.shelf_store = ShelfPathPropertyStore('/tmp/garbage')

    def test001_SetProperty(self):
        self.zodb_store.setproperty('/ingot/', 'value', 45)
        self.shelf_store.setproperty('/ingot/', 'value', 45)

    def test002_GetProperty(self):
        self.assertEquals(self.zodb_store.getproperty('/ingot/', 'value'), 45)
        self.assertEquals(self.shelf_store.getproperty('/ingot/', 'value'), 45)

    def test003_HasProperty(self):
        assert self.zodb_store.hasproperty('/ingot/', 'value')
        assert self.shelf_store.hasproperty('/ingot/', 'value')

    def test004_Acquire(self):
        self.assertEquals(
            self.zodb_store.acquire('/ingot/petunia/french/gorgon.pdf',
                                    'value'), 45)
        self.assertEquals(
            self.shelf_store.acquire('/ingot/petunia/french/gorgon.pdf',
                                     'value'), 45)
class PathTests(unittest.TestCase):

    def setUp(self):
        # you have to start this up yourself for this to work.
        self.zodb_store=ZODBPathPropertyStore('/tmp/zeo_socket',
                                              'pps_store1')
        self.shelf_store=ShelfPathPropertyStore('/tmp/garbage')

    def test001_SetProperty(self):
        self.zodb_store.setproperty('/ingot/', 'value', 45)
        self.shelf_store.setproperty('/ingot/', 'value', 45)

    def test002_GetProperty(self):
        self.assertEquals(self.zodb_store.getproperty('/ingot/', 'value'), 45)
        self.assertEquals(self.shelf_store.getproperty('/ingot/', 'value'), 45)

    def test003_HasProperty(self):
        assert self.zodb_store.hasproperty('/ingot/', 'value')
        assert self.shelf_store.hasproperty('/ingot/', 'value')

    def test004_Acquire(self):
        self.assertEquals(self.zodb_store.acquire('/ingot/petunia/french/gorgon.pdf', 'value'), 45)
        self.assertEquals(self.shelf_store.acquire('/ingot/petunia/french/gorgon.pdf', 'value'), 45)
Example #3
0
 def setUp(self):
     # you have to start this up yourself for this to work.
     self.zodb_store=ZODBPathPropertyStore('/tmp/zeo_socket',
                                           'pps_store1')
     self.shelf_store=ShelfPathPropertyStore('/tmp/garbage')