()
| 436 | delete_nodes(NODES) |
| 437 | |
| 438 | def test_put_attributesstr(): |
| 439 | NODE = create_nodes(["AAA.txt"])[0] |
| 440 | TESTDATA = {"attributes_str": (None, '{"project_id":"TESTPROJECT2"}')} |
| 441 | TESTHEADERS = {"Authorization": "OAuth {}".format(TOKEN)} |
| 442 | if DEBUG: |
| 443 | print("PUT", SHOCK_URL + "/node/" + NODE, TESTDATA) |
| 444 | r = requests.put(SHOCK_URL + "/node/" + |
| 445 | NODE, files=TESTDATA, headers=TESTHEADERS) |
| 446 | if DEBUG: |
| 447 | print(r.content.decode("utf-8")) |
| 448 | data = json.loads(r.content.decode("utf-8")) |
| 449 | if DEBUG: |
| 450 | print(data) |
| 451 | assert data["data"]["attributes"]["project_id"] == "TESTPROJECT2" |
| 452 | TESTDATA = {"attributes_str": (None, '{"project_id":"TESTPROJECT"}')} |
| 453 | if DEBUG: |
| 454 | print("PUT", SHOCK_URL + "/node/" + NODE, TESTDATA) |
| 455 | r = requests.put(SHOCK_URL + "/node/" + |
| 456 | NODE, files=TESTDATA, headers=TESTHEADERS) |
| 457 | if DEBUG: |
| 458 | print(r.content.decode("utf-8")) |
| 459 | data = json.loads(r.content.decode("utf-8")) |
| 460 | assert data["data"]["attributes"]["project_id"] == "TESTPROJECT" |
| 461 | |
| 462 | |
| 463 | def test_post_attributes(): |
nothing calls this directly
no test coverage detected