示例#1
0
    def test_variable_substitution(self,):
        yql = YQL()
        var = {'home': 'Congo'}
        yql.set(var) 

        response = yql.select('geo.states', remote_filter=(5,)).where(['place', '=', '@home'])
        logging.debug(pretty_json(response.content))
        self.assertEqual(response.status_code, 200)
示例#2
0
文件: tests.py 项目: kounkou/myql
 def setUp(self, ):
     self.oauth = OAuth1(None, None, from_file='credentials.json')
     self.yql = YQL(oauth=self.oauth)
示例#3
0
文件: tests.py 项目: kounkou/myql
 def setUp(self, ):
     self.yql = YQL(diagnostics=True, )
示例#4
0
文件: tests.py 项目: kounkou/myql
 def setUp(self, ):
     self.yql = YQL()
示例#5
0
文件: tests.py 项目: kounkou/myql
 def test_cross_product(self):
     yql = YQL(format='xml', crossProduct=True)
     response = yql.select('weather.forecast').where(
         ['location', '=', '90210'])
     logging.debug("{0} {1}".format(response.status_code, response.reason))
     self.assertEqual(response.status_code, 200)