Commit b6493154 authored by Léo-Paul Géneau's avatar Léo-Paul Géneau 👾

to discard

parent fb309f64
......@@ -199,17 +199,14 @@ class DataBucketStream(Document):
"""
Get one bucket
"""
persistent_string = self._tree[key]
v = persistent_string.value
persistent_string._p_deactivate() # free memory
return v
return self._tree[key].value
def getBucketByIndex(self, index=None):
"""
Get one bucket
"""
key = self._long_index_tree[index]
return self.getBucketByKey(key)
return self.getBucketByKey(key).value
def getKeyByIndex(self, index):
"""
......@@ -435,4 +432,4 @@ for index_class in (
ContainerAssertions[index_class] = 1
# Cleanup
del index_class
del index_class
\ No newline at end of file
......@@ -15,6 +15,7 @@
</permission>
<permission type='tuple'>
<name>Access contents information</name>
<role>Anonymous</role>
<role>Assignee</role>
<role>Assignor</role>
<role>Associate</role>
......
......@@ -15,6 +15,7 @@
</permission>
<permission type='tuple'>
<name>Access contents information</name>
<role>Anonymous</role>
<role>Assignee</role>
<role>Assignor</role>
<role>Associate</role>
......
......@@ -80,8 +80,8 @@
<string>my_reference</string>
<string>my_version</string>
<string>my_publication_section_list</string>
<string>your_array_dtype</string>
<string>your_array_shape</string>
<string>my_array_dtype</string>
<string>my_array_shape</string>
</list>
</value>
</item>
......
......@@ -8,7 +8,7 @@
<dictionary>
<item>
<key> <string>id</string> </key>
<value> <string>your_array_dtype</string> </value>
<value> <string>my_array_dtype</string> </value>
</item>
<item>
<key> <string>message_values</string> </key>
......
......@@ -8,7 +8,7 @@
<dictionary>
<item>
<key> <string>id</string> </key>
<value> <string>your_array_shape</string> </value>
<value> <string>my_array_shape</string> </value>
</item>
<item>
<key> <string>message_values</string> </key>
......@@ -116,19 +116,13 @@
<key> <string>alternate_name</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>autocomplete</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>css_class</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>default</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
<value> <string></string> </value>
</item>
<item>
<key> <string>description</string> </key>
......@@ -279,17 +273,4 @@
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<global name="TALESMethod" module="Products.Formulator.TALESField"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_text</string> </key>
<value> <string>python: here.getArrayShape()</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
from DateTime import DateTime
from zExceptions import NotFound
now = DateTime()
today_string = now.strftime('%Y%m%d')
......@@ -117,23 +116,16 @@ if modify and data_ingestion is None:
# find ingestion line for current resource
input_line = None
operation_line = None
for line in data_ingestion.objectValues(portal_type="Data Ingestion Line"):
if line.getResourceReference() == resource_reference:
input_line = line
elif line.getResourceValue().getPortalType() == "Data Operation":
operation_line = line
if input_line is None:
raise NotFound('No relevant data ingestion line found.')
if modify and input_line.getQuantity() == 0:
init_input_line(input_line, operation_line)
if operation_line is None:
raise NotFound('No relevant data operation found.')
data_operation = operation_line.getResourceValue()
parameter_dict = {
input_line.getReference(): \
{v.getPortalType(): v for v in input_line.getAggregateValueList()}}
......
......@@ -261,7 +261,6 @@ class Test(ERP5TypeTestCase):
key = len(bucket_stream) + 1
bucket_stream.insertBucket(key, bin_string )
self.assertEqual(bin_string, bucket_stream.getBucketByKey(key))
self.assertEqual(bin_string, bucket_stream.getBucketByIndex(0))
# test sequence
self.assertEqual(1, len(bucket_stream))
......@@ -591,6 +590,7 @@ class Test(ERP5TypeTestCase):
self.assertNotEqual(ingestion_policy, None)
self.commit()
self.tic()
self.addCleanup(self._removeDocument, ingestion_policy)
......@@ -750,6 +750,7 @@ result = [x for x in data_bucket_stream.getBucketIndexKeySequenceByIndex()]
for data_analysis_title in data_analysis_title_list:
self.assertEqual(getDataAnalysisByTitle(data_analysis_title), None)
self.commit()
self.tic()
self.portal.portal_alarms.wendelin_handle_analysis.activeSense()
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment