def test_get_connection_notfound(clear) -> None: with pytest.raises(BadRequestException): get_connection('abc')
def test_get_connection(clear, mocker) -> None: connection = mocker.Mock() CONNECTION_POOL['abc'] = connection assert get_connection('abc') == connection