"""Unit tests for YouTube Neo4j Workflow.""" from unittest import mock from unittest.mock import MagicMock from feed_ingestion.flows.youtube_neo4j.flow import Flow def test_decider(): """Test normal decider execution.""" schedule = MagicMock() flow = Flow() flow.decider(schedule) schedule.assert_has_calls([ mock.call('bootstrap', mock.ANY), mock.call().result.get('bootstrap.stop'), mock.call('check_staging_status', mock.ANY, requires=[mock.ANY]), mock.call().result.get('check_staging_status.stop'), mock.call('clear_log_table', mock.ANY, requires=[mock.ANY]), mock.call('create_tables', mock.ANY, requires=[mock.ANY]), mock.call('ingest_youtube_data', mock.ANY, requires=[mock.ANY]), mock.call('insert_into_log_table', mock.ANY, requires=[mock.ANY]) ])