Пример #1
0
 def setUp(self):
     self.store = CephStore()
Пример #2
0
 def setUp(self):
     self.store = CephStore()
Пример #3
0
class TestCephStore(unittest.TestCase):
    '''series of tests to check the implementation of the CephStore.
        Not really unittests, more integration tests'''
    def setUp(self):
        self.store = CephStore()

    def tearDown(self):
        pass

    def test_usage_scenario(self):
        container_key = 'testing'
        object_key = 'metadata'
        self.store.create_container(container_key)
        self.store.create_object(container_key, object_key, 'some test data')
        object_value = self.store.get_object(container_key, object_key)
        self.assertEqual(None, object_value)
        self.store.delete_object(container_key, object_key)
        object_list = self.store.list_object_keys_for_container(container_key)
        self.assertEqual(None, object_list)
        self.store.update_object(container_key, object_key, 'updated data')
        self.store.delete_container(container_key)
Пример #4
0
class TestCephStore(unittest.TestCase):
    '''series of tests to check the implementation of the CephStore.
        Not really unittests, more integration tests'''

    def setUp(self):
        self.store = CephStore()

    def tearDown(self):
        pass

    def test_usage_scenario(self):
        container_key = 'testing'
        object_key = 'metadata'
        self.store.create_container(container_key)
        self.store.create_object(container_key, object_key, 'some test data')
        object_value = self.store.get_object(container_key, object_key)
        self.assertEqual(None, object_value)
        self.store.delete_object(container_key, object_key)
        object_list = self.store.list_object_keys_for_container(container_key)
        self.assertEqual(None, object_list)
        self.store.update_object(container_key, object_key, 'updated data')
        self.store.delete_container(container_key)