"""Shared test mocks.""" import json import pytest def load_file_json(filepath): """Load json from file.""" with open(filepath) as event_file: read_data = event_file.read() return json.loads(read_data) @pytest.fixture def mock_event(): """Mock event.""" return load_file_json('tests/sample_msk_event.json') @pytest.fixture def mock_graphql_response(): """Mock graphql response for email mutation.""" return { 'data': { 'emailNotification': { 'status': 'ok', 'profiles': [], 'notificationType': 'rejection' } } }