"""Configuration for functional tests.""" import pytest @pytest.fixture(autouse=True) def fresh_db(fresh_db): """Automatically clear the db between tests in this folder.""" pass @pytest.fixture def mock_bulk_ledgers_body(): """Mock bulk ledger POST body.""" return [ { 'currency_amount': 44.44, 'currency_code': 'USD', 'abacus_event_id': 1, 'model_type': 'account', 'account_id': 1, 'contract_id': 1, }, { 'currency_code': 'USD', 'abacus_event_id': 1, 'model_type': 'deposit', 'remaining_amount': 0.004444444444444444, 'rounded_amount': 44.44, 'contract_id': 1, 'account_id': 1, }, ] @pytest.fixture def mock_bulk_ledger_accounting_run_vat_body(): """Mock bulk ledger accounting run vat POST body.""" return [ { 'accounting_run_id': 1, 'abacus_event_id': 1, 'contract_id': 1, 'currency_code': 'USD', 'country_of_tax_residence': 'USA', 'exempt_reason': 'US citizenship', }, { 'accounting_run_id': 1, 'abacus_event_id': 1, 'contract_id': 1, 'currency_code': 'GBP', 'country_of_tax_residence': 'GBR', 'gross_revenue': 200.00, 'net_revenue': 180.00, 'distribution_fee': 2.00, 'gross_vat_rate': 20.00, 'distribution_vat_rate': 20.00, 'gross_vat': 20.00, 'distribution_vat': 0.25, 'adjusted_net_revenue': 175.00, }, ]