コード例 #1
0
ファイル: views_test.py プロジェクト: tetratorus/bouncer
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")
コード例 #2
0
ファイル: views_test.py プロジェクト: pombredanne/bouncer-1
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")
コード例 #3
0
ファイル: views_test.py プロジェクト: tetratorus/bouncer
def test_index_redirects_to_hypothesis():
    with pytest.raises(httpexceptions.HTTPFound) as exc:
        views.index(mock_request())
    assert exc.value.location == "https://hypothes.is"
コード例 #4
0
ファイル: views_test.py プロジェクト: pombredanne/bouncer-1
def test_index_redirects_to_hypothesis():
    with pytest.raises(httpexceptions.HTTPFound) as exc:
        views.index(mock_request())
    assert exc.value.location == "https://hypothes.is"