本文整理匯總了Python中prestoadmin.prestoclient.PrestoClient.next_uri方法的典型用法代碼示例。如果您正苦於以下問題:Python PrestoClient.next_uri方法的具體用法?Python PrestoClient.next_uri怎麽用?Python PrestoClient.next_uri使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類prestoadmin.prestoclient.PrestoClient
的用法示例。
在下文中一共展示了PrestoClient.next_uri方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。
示例1: test_execute_query_get_port
# 需要導入模塊: from prestoadmin.prestoclient import PrestoClient [as 別名]
# 或者: from prestoadmin.prestoclient.PrestoClient import next_uri [as 別名]
def test_execute_query_get_port(self, run_mock, conn_mock):
client = PrestoClient('any_host', 'any_user')
client.rows = ['hello']
client.next_uri = 'hello'
client.response_from_server = {'hello': 'hello'}
run_mock.return_value = _AttributeString('http-server.http.port=8080')
run_mock.return_value.failed = False
client.execute_query('select * from nation')
self.assertEqual(client.port, 8080)
self.assertEqual(client.rows, [])
self.assertEqual(client.next_uri, '')
self.assertEqual(client.response_from_server, {})
示例2: testrun_sql_get_port
# 需要導入模塊: from prestoadmin.prestoclient import PrestoClient [as 別名]
# 或者: from prestoadmin.prestoclient.PrestoClient import next_uri [as 別名]
def testrun_sql_get_port(self, sudo_mock, conn_mock, mock_presto_config):
client = PrestoClient('any_host', 'any_user')
client.rows = ['hello']
client.next_uri = 'hello'
client.response_from_server = {'hello': 'hello'}
sudo_mock.return_value = _AttributeString('http-server.http.port=8080')
sudo_mock.return_value.failed = False
sudo_mock.return_value.return_code = 0
client.run_sql('select * from nation')
self.assertEqual(client.port, 8080)
self.assertEqual(client.rows, [])
self.assertEqual(client.next_uri, '')
self.assertEqual(client.response_from_server, {})