"""Test catalog_ingestion.""" from unittest.mock import patch from common.helpers.catalog_ingestion import log_catalog_action import pytest @pytest.mark.parametrize( 'loaded_json,asset_type', [ ('loaded_json_artwork', 'cover'), ('loaded_json_audio', 'audio') ]) @patch('common.helpers.catalog_ingestion.CatalogIngestionSession.save') def test_log_catalog_action( mock_catalog_ingestion_session, loaded_json, asset_type, request ): """Test log_catalog_action.""" log_catalog_action( 'bucket', 'folder', request.getfixturevalue(loaded_json), 'insert', asset_type, 'Failed', 'Test Error: Test Cause' ) mock_catalog_ingestion_session.assert_called_once()