import requests
import pwndoc_api


def pwndoc_connectivity_test():
    ok = True
    try:
        pwndoc_api.login()
    except requests.exceptions.ConnectionError:
        ok = False  # assert is not here to make the fail output shorter and more readable
    assert ok, "PwnDoc is not reachable. Is it running?"
