コード例 #1
0
def test_get_connection_notfound(clear) -> None:
    with pytest.raises(BadRequestException):
        get_connection('abc')
コード例 #2
0
def test_get_connection(clear, mocker) -> None:
    connection = mocker.Mock()
    CONNECTION_POOL['abc'] = connection
    assert get_connection('abc') == connection