"""Test Setup.""" from dotenv import load_dotenv import pytest load_dotenv() @pytest.fixture def mock_adjustments(): """Mock an adjustments.""" return [ { 'amount': '100.00', 'adjustment_id': 632, 'memo': 'Invoice Fee', 'apply_on': '2020-02-07', 'accounting_run_id': 1337, 'contract_id': 2086348, 'currency_code': 'USD' }, { 'amount': '200.00', 'adjustment_id': 633, 'memo': 'Wire Fee', 'apply_on': '2020-02-07', 'accounting_run_id': 1337, 'contract_id': 2096218, 'currency_code': 'USD' } ] @pytest.fixture def mock_mapped_adjustments(): """Mock mapped adjustments.""" return [ { 'adjustment_amount': '100.00', 'adjustment_id': 632, 'adjustment_apply_on': '2020-02-07', 'contract_id': 2086348, 'adjustment_currency_code': 'USD', 'adjustment_currency_id': 840 }, { 'adjustment_amount': '200.00', 'adjustment_id': 633, 'adjustment_apply_on': '2020-02-07', 'contract_id': 2096218, 'adjustment_currency_code': 'USD', 'adjustment_currency_id': 840 } ] @pytest.fixture def mock_event(): """Mock an event.""" return { 'abacus_event_id': 1, 'target_type': 'accounting_run', 'target_id': '1337', 'event_name': 'example-lambda', 'timestamp': '1997-07-16T19:20:30.45+01:00', 'user_type': 'royalties', 'user_id': '1' }