()
| 119 | |
| 120 | |
| 121 | def test_upload_threefiles(): |
| 122 | NODES = create_nodes(FILELIST) |
| 123 | TESTURL = "{SHOCK_URL}/node/?query".format(SHOCK_URL=SHOCK_URL) |
| 124 | if DEBUG: |
| 125 | print(TESTURL) |
| 126 | TESTDATA = {} |
| 127 | TESTHEADERS = {"Authorization": "OAuth {}".format(TOKEN)} |
| 128 | response = requests.get(TESTURL, headers=TESTHEADERS, params=TESTDATA) |
| 129 | data = json.loads(response.content.decode("utf-8")) |
| 130 | assert data["total_count"] >= 3 |
| 131 | assert NODES[0] in response.content.decode("utf-8") |
| 132 | assert b"AAA.txt" in response.content |
| 133 | assert b"BBB.txt" in response.content |
| 134 | assert b"CCC.txt" in response.content |
| 135 | # cleanup |
| 136 | for NODEID in NODES: |
| 137 | NODEURL = SHOCK_URL + "/node/{}".format(NODEID) |
| 138 | response = requests.delete(NODEURL, headers=TESTHEADERS) |
| 139 | |
| 140 | |
| 141 | def test_upload_and_delete_node(): |
nothing calls this directly
no test coverage detected