Skip to content

Commit cd48868

Browse files
committed
stopping wrapping of driver exceptions as is maintenance issue
1 parent ed60db0 commit cd48868

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

tests/integration/test_consistency_and_prepared_statements.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -643,9 +643,9 @@ async def test_prepared_statement_error_handling(
643643
and clear debugging information.
644644
"""
645645
# Test preparing invalid query
646-
from async_cassandra.exceptions import QueryError
646+
from cassandra.protocol import SyntaxException
647647

648-
with pytest.raises(QueryError):
648+
with pytest.raises(SyntaxException):
649649
await cassandra_session.prepare("INVALID SQL QUERY")
650650

651651
# Create test table
@@ -689,7 +689,9 @@ async def test_prepared_statement_error_handling(
689689
pass # Expected
690690

691691
# Test non-existent column
692-
with pytest.raises(QueryError):
692+
from cassandra import InvalidRequest
693+
694+
with pytest.raises(InvalidRequest):
693695
await cassandra_session.prepare(
694696
f"INSERT INTO {table_name} (id, nonexistent) VALUES (?, ?)"
695697
)

0 commit comments

Comments
 (0)