コード例 #1
0
ファイル: test_exception.py プロジェクト: shoman2/fbchat
def test_handle_http_error_404_handling():
    with pytest.raises(HTTPError, match="invalid id"):
        handle_http_error(404)
コード例 #2
0
ファイル: test_exception.py プロジェクト: shoman2/fbchat
def test_handle_http_error_no_error():
    assert handle_http_error(200) is None
    assert handle_http_error(302) is None
コード例 #3
0
ファイル: test_exception.py プロジェクト: shoman2/fbchat
def test_handle_http_error():
    with pytest.raises(HTTPError):
        handle_http_error(400)
    with pytest.raises(HTTPError):
        handle_http_error(500)