예제 #1
0
파일: test_json.py 프로젝트: Vayana/sumpter
 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
예제 #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'])