示例#1
0
    def test_object_to_cached_cuboid_keys(self):
        """Test to check key conversion from cached cuboid to object"""

        object_keys = ['a4931d58076dc47773957809380f206e4228517c9fa6daed536043782024e480&1&1&1&0&0&12',
                       'f2b449f7e247c8aec6ecf754388a65ee6ea9dc245cd5ef149aebb2e0d20b4251&1&1&1&0&0&13']

        os = AWSObjectStore(self.object_store_config)
        cached_cuboid_keys = os.object_to_cached_cuboid_keys(object_keys)
示例#2
0
    def test_object_to_cached_cuboid_keys_str(self):
        """Test to check key conversion from cached cuboid to object when a string instead of a list is passed"""

        object_keys = 'a4931d58076dc47773957809380f206e4228517c9fa6daed536043782024e480&1&1&1&0&0&12'

        os = AWSObjectStore(self.object_store_config)
        cached_cuboid_keys = os.object_to_cached_cuboid_keys(object_keys)

        assert len(cached_cuboid_keys) == 1
        assert cached_cuboid_keys[0] == "CACHED-CUBOID&1&1&1&0&0&12"