Commit d9a3fc10 authored by Ekaterina's avatar Ekaterina

erp5_wendelin: add check of content in test_03_DataArray

parent 018f09db
......@@ -34,6 +34,7 @@ import string
import random
import urllib
from Products.ERP5Type.Log import log
def getRandomString():
return 'test_%s' %''.join([random.choice(string.ascii_letters + string.digits) \
......@@ -235,6 +236,11 @@ class Test(ERP5TypeTestCase):
path = '/erp5/data_array_module/' + data_array.getId()
publish_kw = dict(user='ERP5TypeTestCase', env={'RANGE': 'bytes=0-'}, request_method='GET')
response = self.publish(path, **publish_kw)
array = data_array.getArray()
data = array[:].view('<b').reshape((-1,))[0:1000].tobytes()
self.assertEquals(response.headers["content-range"], 'bytes 0-999/1000')
self.assertEquals(response.body, data)
self.assertEquals(int(response.headers["content-length"]), data_array.getSize())
def test_04_DataBucket(self):
......
......@@ -46,7 +46,8 @@
<key> <string>text_content_warning_message</string> </key>
<value>
<tuple>
<string>W: 64, 35: Unused variable \'data_product\' (unused-variable)</string>
<string>W: 65, 35: Unused variable \'data_product\' (unused-variable)</string>
<string>W: 37, 0: Unused log imported from Products.ERP5Type.Log (unused-import)</string>
</tuple>
</value>
</item>
......
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