mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Skip cassandra_cql tests when driver isn't loaded
Prevents the following failures when the `cassandra` package isn't installed: FAILED tests/pytests/unit/modules/test_cassandra_cql.py::test_cql_query - NameError: name 'dict_factory' is not defined FAILED tests/pytests/unit/modules/test_cassandra_cql.py::test_cql_query_with_prepare - NameError: name 'dict_factory' is not defined FAILED tests/pytests/unit/modules/test_cassandra_cql.py::test_valid_asynchronous_args - NameError: name 'dict_factory' is not defined FAILED tests/pytests/unit/modules/test_cassandra_cql.py::test_valid_async_args - NameError: name 'dict_factory' is not defined Signed-off-by: Joe Groocock <jgroocock@cloudflare.com>
This commit is contained in:
parent
c6921717ec
commit
94425e72d9
1 changed files with 5 additions and 0 deletions
|
@ -15,6 +15,11 @@ from tests.support.mock import MagicMock, patch
|
|||
log = logging.getLogger(__name__)
|
||||
|
||||
|
||||
pytestmark = pytest.mark.skipif(
|
||||
not cassandra_cql.HAS_DRIVER, reason="Cassandra CQL driver not loaded"
|
||||
)
|
||||
|
||||
|
||||
@pytest.fixture
|
||||
def configure_loader_modules():
|
||||
return {cassandra_cql: {}}
|
||||
|
|
Loading…
Add table
Reference in a new issue