MCPcopy
hub / github.com/geldata/gel / run_queries

Method run_queries

tests/test_http_notebook.py:37–53  ·  view source on GitHub ↗
(self, queries: list[str])

Source from the content-addressed store, hash-verified

35 return 'notebook'
36
37 def run_queries(self, queries: list[str]):
38 req_data = {
39 'queries': queries
40 }
41
42 req = urllib.request.Request(
43 self.http_addr, method='POST') # type: ignore
44 req.add_header('Content-Type', 'application/json')
45 req.add_header('Authorization', self.make_auth_header())
46 response = urllib.request.urlopen(
47 req, json.dumps(req_data).encode(), context=self.tls_context
48 )
49
50 self.assertIsNotNone(response.headers['EdgeDB-Protocol-Version'])
51
52 resp_data = json.loads(response.read())
53 return resp_data
54
55 def test_http_notebook_01(self):
56 results = self.run_queries([

Callers 8

test_http_notebook_01Method · 0.95
test_http_notebook_02Method · 0.95
test_http_notebook_03Method · 0.95
test_http_notebook_05Method · 0.95
test_http_notebook_06Method · 0.95
test_http_notebook_07Method · 0.95
test_http_notebook_08Method · 0.95
test_http_notebook_09Method · 0.95

Calls 3

make_auth_headerMethod · 0.80
encodeMethod · 0.45
readMethod · 0.45

Tested by

no test coverage detected