mirror of
https://github.com/trustgraph-ai/trustgraph.git
synced 2026-04-29 10:26:21 +02:00
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:
parent
fdb52a6bfc
commit
22096e07e2
9 changed files with 76 additions and 43 deletions
|
|
@ -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"""
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue