Fix tests broken by the recent RabbitMQ/Cassandra async fixes (#815)

- Fix invalid key in config causing rogue warning
- Fix asyncio test tags
This commit is contained in:
cybermaggedon 2026-04-16 10:00:18 +01:00 committed by GitHub
parent fdb52a6bfc
commit 22096e07e2
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
9 changed files with 76 additions and 43 deletions

View file

@ -18,6 +18,20 @@ from trustgraph.schema import ExtractedObject, Metadata, RowSchema, Field
class TestRowsCassandraIntegration:
"""Integration tests for Cassandra row storage with unified table"""
@pytest.fixture(autouse=True)
def patch_async_execute(self):
"""Route async_execute through session.execute so the mock's
side_effect handles all CQL (DDL and DML) uniformly and every
call lands in mock_session.execute.call_args_list."""
async def _fake(session, query, params=None):
session.execute(query, params)
return []
with patch(
'trustgraph.storage.rows.cassandra.write.async_execute',
new=_fake,
):
yield
@pytest.fixture
def mock_cassandra_session(self):
"""Mock Cassandra session for integration tests"""