(query)
| 222 | "query", [NEW_GRAPH, MOVE_GRAPH, COPY_GRAPH, DELETE_GRAPH, CREATE_SUBGRAPH] |
| 223 | ) |
| 224 | def test_mutations(query): |
| 225 | work_dir = tempfile.mkdtemp() |
| 226 | with GraphServer( |
| 227 | work_dir, config={"auth": {"public_key": PUB_KEY}} |
| 228 | ).start() as server: |
| 229 | port = server.port() |
| 230 | add_test_graph(port) |
| 231 | data = json.dumps({"query": query}) |
| 232 | |
| 233 | response = requests.post(raphtory_url(port), data=data) |
| 234 | assert response.status_code == 401 |
| 235 | |
| 236 | response = requests.post(raphtory_url(port), headers=READ_HEADERS, data=data) |
| 237 | assert response.json()["data"] is None |
| 238 | assert ( |
| 239 | response.json()["errors"][0]["message"] |
| 240 | == "The requested endpoint requires write access" |
| 241 | ) |
| 242 | |
| 243 | response = requests.post(raphtory_url(port), headers=WRITE_HEADERS, data=data) |
| 244 | assert_successful_response(response) |
| 245 | |
| 246 | |
| 247 | def test_raphtory_client(): |
nothing calls this directly
no test coverage detected