Example #1
0
def test_index_increments_stat(statsd):
    try:
        views.index(mock_request())
    except:
        pass

    statsd.incr.assert_called_once_with(
        "views.index.302.redirected_to_hypothesis")
Example #2
0
def test_index_increments_stat(statsd):
    try:
        views.index(mock_request())
    except:
        pass

    statsd.incr.assert_called_once_with(
        "views.index.302.redirected_to_hypothesis")
Example #3
0
def test_index_redirects_to_hypothesis():
    with pytest.raises(httpexceptions.HTTPFound) as exc:
        views.index(mock_request())
    assert exc.value.location == "https://hypothes.is"
Example #4
0
def test_index_redirects_to_hypothesis():
    with pytest.raises(httpexceptions.HTTPFound) as exc:
        views.index(mock_request())
    assert exc.value.location == "https://hypothes.is"