def test_base(self):
pipe = test_helper.get_mock_pipeline([helper.RUN_PIPELINE])
_strings = strings.Subscriber(pipe)
_strings.setup({
'min_string_length': 4,
'max_lines': 2
})
doc = document.get_document('mock')
doc.set_size(12345)
_strings.consume(doc, StringIO('AAAA\x00BBBB\x00CCCC'))
# Two child documents produced.
self.assertEquals(2, len(pipe.consumer.produced))
expected = 'mock.00000.child'
actual = pipe.consumer.produced[0][0].path
self.assertEquals(expected, actual)
评论列表
文章目录