(url)
| 22 | |
| 23 | |
| 24 | def api(url): |
| 25 | json = requests.get(url=url, headers={"Authorization": f"token {token}"}).json() |
| 26 | if "message" in json and json["message"] == "Bad credentials": |
| 27 | raise RuntimeError("Invalid token provided") |
| 28 | else: |
| 29 | return json |
| 30 | |
| 31 | |
| 32 | resp = api(core_url) |
no test coverage detected