def METHOD_NAME(pgconn):
    with pytest.raises(psycopg.OperationalError):
        pgconn.put_copy_data(b"wat")
    pgconn.finish()
    with pytest.raises(psycopg.OperationalError):
        pgconn.put_copy_data(b"wat")