コード例 #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
ファイル: test_http_get.py プロジェクト: Vayana/sumpter
 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'])