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

Function test_disabled_read_access

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

Source from the content-addressed store, hash-verified

134
135@pytest.mark.parametrize("query", TEST_QUERIES)
136def test_disabled_read_access(query):
137 work_dir = tempfile.mkdtemp()
138 with GraphServer(
139 work_dir,
140 config={"auth": {"public_key": PUB_KEY, "require_auth_for_reads": False}},
141 ).start() as server:
142 port = server.port()
143 add_test_graph(port)
144 data = json.dumps({"query": query})
145
146 response = requests.post(raphtory_url(port), data=data)
147 assert_successful_response(response)
148
149 response = requests.post(raphtory_url(port), headers=READ_HEADERS, data=data)
150 assert_successful_response(response)
151
152 response = requests.post(raphtory_url(port), headers=WRITE_HEADERS, data=data)
153 assert_successful_response(response)
154
155
156ADD_NODE = """

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