(method: str, path: str, body: str = "")
| 92 | |
| 93 | |
| 94 | def request(method: str, path: str, body: str = "") -> bytes: |
| 95 | print(f"{method} {path}") |
| 96 | conn.request(method, path, body, headers=headers) |
| 97 | resp = conn.getresponse() |
| 98 | data = resp.read() |
| 99 | print(f"{resp.status} {resp.reason}") |
| 100 | # noinspection PyUnreachableCode |
| 101 | if False: |
| 102 | assert "CI" not in os.environ |
| 103 | # This contains sensitive data such as the fileUploadUrl, so don't print it in production. |
| 104 | print(data.decode(errors="ignore")) |
| 105 | assert 200 <= resp.status < 300 |
| 106 | return data |
| 107 | |
| 108 | |
| 109 | print("Getting app info...") |
no test coverage detected
searching dependent graphs…