pythonasyncioapiasyncfastapiframeworkjsonjson-schemaopenapiopenapi3pydanticpython-typespython3redocreststarletteswaggerswagger-uiuvicornweb
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
15 lines
536 B
15 lines
536 B
# Mock cassandra module to avoid Python 3.14+ import issues
|
|
# (asyncore removed in 3.12, cassandra-driver needs event loop)
|
|
import sys
|
|
from types import ModuleType
|
|
from unittest.mock import MagicMock
|
|
|
|
mock_cassandra = ModuleType("cassandra")
|
|
mock_cassandra_cluster = ModuleType("cassandra.cluster")
|
|
mock_cassandra_cluster.Cluster = MagicMock
|
|
|
|
# Set cluster attribute on cassandra module
|
|
mock_cassandra.cluster = mock_cassandra_cluster
|
|
|
|
sys.modules["cassandra"] = mock_cassandra
|
|
sys.modules["cassandra.cluster"] = mock_cassandra_cluster
|
|
|