MCPcopy Create free account
hub / github.com/Pometry/Raphtory / test_default_read_access

Function test_default_read_access

python/tests/test_auth.py:116–132  ·  view source on GitHub ↗
(query)

Source from the content-addressed store, hash-verified

114
115@pytest.mark.parametrize("query", TEST_QUERIES)
116def test_default_read_access(query):
117 work_dir = tempfile.mkdtemp()
118 with GraphServer(
119 work_dir, config={"auth": {"public_key": PUB_KEY}}
120 ).start() as server:
121 port = server.port()
122 add_test_graph(port)
123 data = json.dumps({"query": query})
124
125 response = requests.post(raphtory_url(port), data=data)
126 assert response.status_code == 401
127
128 response = requests.post(raphtory_url(port), headers=READ_HEADERS, data=data)
129 assert_successful_response(response)
130
131 response = requests.post(raphtory_url(port), headers=WRITE_HEADERS, data=data)
132 assert_successful_response(response)
133
134
135@pytest.mark.parametrize("query", TEST_QUERIES)

Callers

nothing calls this directly

Calls 6

GraphServerClass · 0.90
add_test_graphFunction · 0.85
raphtory_urlFunction · 0.85
startMethod · 0.45
portMethod · 0.45

Tested by

no test coverage detected