Exemplo n.º 1
0
 def testSimpleParse(self):
     val = {}
     val['jsonstring'] = '["foo", {"bar":["baz", null, 1.0, 2]}]'
     drop = Drop({},val)
     seg = JsonParser('jsonparser',jsonstring=drop_dict_ref('jsonstring'))
     result = seg.send(drop)
     print '==============>',result
Exemplo n.º 2
0
 def testSimpleHttpGetWithUrlValRef(self):
     coll = Collector('collector')
     pype = HttpReader('google-reader',url=drop_dict_ref('url')) | coll 
     drop = Drop({},{'url':'http://localhost:8001/hello'})
     pype.head.send(drop)
     self.assertEquals(coll.vals,['world'])