コード例 #1
0
def test_my_shots_page():
    with screenshots_session() as user:
        user.read_my_shots()

    # e.g. direct navigation to /shots in private window
    unauthed_user = ScreenshotsClient()
    response = unauthed_user.get_uri("/shots")
    response.raise_for_status()
コード例 #2
0
def test_my_shots_page():
    with screenshots_session() as user:
        user.read_my_shots()

    # e.g. direct navigation to /shots in private window
    unauthed_user = ScreenshotsClient()
    response = unauthed_user.get_uri("/shots")
    response.raise_for_status()
コード例 #3
0
def test_heartbeat():
    unauthed_user = ScreenshotsClient()
    response = unauthed_user.get_uri("/__heartbeat__")
    response.raise_for_status()
コード例 #4
0
def test_dunder_version():
    unauthed_user = ScreenshotsClient()
    response = unauthed_user.get_uri("/__version__")
    response.raise_for_status()
コード例 #5
0
def test_contribute_json():
    unauthed_user = ScreenshotsClient()
    response = unauthed_user.get_uri("/contribute.json")
    if response.status_code != 200:
        response.raise_for_status()
コード例 #6
0
def test_404_page():
    unauthed_user = ScreenshotsClient()
    response = unauthed_user.get_uri("/404")
    if response.status_code != 404:
        response.raise_for_status()
コード例 #7
0
def test_landing_page():
    unauthed_user = ScreenshotsClient()

    resp = unauthed_user.get_uri("/")
    assert resp.status_code == 200
コード例 #8
0
def test_heartbeat():
    unauthed_user = ScreenshotsClient()
    response = unauthed_user.get_uri("/__heartbeat__")
    response.raise_for_status()
コード例 #9
0
def test_dunder_version():
    unauthed_user = ScreenshotsClient()
    response = unauthed_user.get_uri("/__version__")
    response.raise_for_status()
コード例 #10
0
def test_contribute_json():
    unauthed_user = ScreenshotsClient()
    response = unauthed_user.get_uri("/contribute.json")
    if response.status_code != 200:
        response.raise_for_status()
コード例 #11
0
def test_404_page():
    unauthed_user = ScreenshotsClient()
    response = unauthed_user.get_uri("/404")
    if response.status_code != 404:
        response.raise_for_status()
コード例 #12
0
def test_landing_page():
    unauthed_user = ScreenshotsClient()

    resp = unauthed_user.get_uri("/")
    assert resp.status_code == 200