"""Transaction fixtures.""" from datetime import datetime from collaborator.constants import transaction as constants TRANSACTIONS = [ { "id": 1, "collaborator_id": 1, "date": "2019-09-08", "type": constants.TYPE_REVENUE, "description": "Manual revenue", "original_amount": 100.0, "collaborator_share": 1.0, "chargeable_amount": 100.0, "transferwise_transaction_id": None, "report_id": None, "created_date": datetime(2019, 9, 8, 7, 6, 5).isoformat(), "voided_transaction_id": None, "credited_payment_id": None, "currency": "USD", "deleted_date": None, "current_balance": 0, "statement_period_id": 1, "creation_batch_uuid": None, }, { "id": 2, "collaborator_id": 1, "date": "2019-10-09", "type": constants.TYPE_PAYMENT, "description": "Payment", "original_amount": 50.0, "collaborator_share": 1.0, "chargeable_amount": 50.0, "transferwise_transaction_id": 1, "report_id": None, "created_date": datetime(2019, 10, 9, 8, 7, 6).isoformat(), "voided_transaction_id": None, "credited_payment_id": None, "currency": None, "deleted_date": None, "current_balance": 0, "statement_period_id": 1, "creation_batch_uuid": None, }, { "id": 3, "collaborator_id": 1, "date": "2019-11-10", "type": constants.TYPE_EXPENSE, "description": "Expense", "original_amount": 100.0, "collaborator_share": 1.0, "chargeable_amount": 100.0, "transferwise_transaction_id": None, "report_id": None, "created_date": datetime(2019, 11, 10, 9, 8, 7).isoformat(), "voided_transaction_id": None, "credited_payment_id": None, "currency": None, "deleted_date": None, "current_balance": 0, "statement_period_id": 1, "creation_batch_uuid": None, }, { "id": 4, "collaborator_id": 1, "date": "2020-01-02", "type": constants.TYPE_VOID, "description": "Void", "original_amount": 100.0, "collaborator_share": 1.0, "chargeable_amount": 100.0, "transferwise_transaction_id": None, "report_id": None, "created_date": datetime(2020, 1, 2, 3, 4, 5).isoformat(), "voided_transaction_id": 3, "credited_payment_id": None, "currency": "USD", "deleted_date": None, "current_balance": 0, "statement_period_id": 1, "creation_batch_uuid": None, }, { "id": 5, "collaborator_id": 1, "date": "2020-02-03", "type": constants.TYPE_REVENUE, "description": "Report revenue", "original_amount": 1234.0, "collaborator_share": 1.0, "chargeable_amount": 1234.0, "transferwise_transaction_id": None, "report_id": 1, "created_date": datetime(2020, 2, 3, 4, 5, 6).isoformat(), "voided_transaction_id": None, "credited_payment_id": None, "currency": None, "deleted_date": None, "current_balance": 0, "statement_period_id": 2, "creation_batch_uuid": None, }, ] SORTED_TRANSACTIONS = [ { "id": 5, "collaborator_id": 1, "date": "2020-02-03", "type": constants.TYPE_REVENUE, "description": "Report revenue", "original_amount": 1234.0, "collaborator_share": 1.0, "chargeable_amount": 1234.0, "transferwise_transaction_id": None, "report_id": 1, "created_date": datetime(2020, 2, 3, 4, 5, 6).isoformat(), "voided_transaction_id": None, "credited_payment_id": None, "currency": "USD", "transferwise_batch_id": None, "transferwise_transaction_status": None, "deleted_date": None, "current_balance": 0, "statement_period_id": 2, "creation_batch_uuid": None, }, { "id": 3, "collaborator_id": 1, "date": "2019-11-10", "type": constants.TYPE_EXPENSE, "description": "Expense", "original_amount": -100.0, "collaborator_share": 1.0, "chargeable_amount": -100.0, "transferwise_transaction_id": None, "report_id": None, "created_date": datetime(2019, 11, 10, 9, 8, 7).isoformat(), "voided_transaction_id": None, "credited_payment_id": None, "currency": "USD", "transferwise_batch_id": None, "transferwise_transaction_status": None, "deleted_date": None, "current_balance": 0, "statement_period_id": 1, "creation_batch_uuid": None, }, { "id": 2, "collaborator_id": 1, "date": "2019-10-09", "type": constants.TYPE_PAYMENT, "description": "Payment", "original_amount": -50.0, "collaborator_share": 1.0, "chargeable_amount": -50.0, "transferwise_transaction_id": 1, "report_id": 1, "created_date": datetime(2019, 10, 9, 8, 7, 6).isoformat(), "voided_transaction_id": None, "credited_payment_id": None, "currency": "USD", "transferwise_batch_id": 1, "transferwise_transaction_status": "outgoing_payment_sent", "deleted_date": None, "current_balance": 0, "statement_period_id": 1, "creation_batch_uuid": None, }, { "id": 1, "collaborator_id": 1, "date": "2019-09-08", "type": constants.TYPE_REVENUE, "description": "Manual revenue", "original_amount": 100.0, "collaborator_share": 1.0, "chargeable_amount": 100.0, "transferwise_transaction_id": None, "report_id": None, "created_date": datetime(2019, 9, 8, 7, 6, 5).isoformat(), "voided_transaction_id": None, "credited_payment_id": None, "currency": "USD", "transferwise_batch_id": None, "transferwise_transaction_status": None, "deleted_date": None, "current_balance": 0, "statement_period_id": 1, "creation_batch_uuid": None, }, ] MISMATCH_TRANSACTIONS = [ { "id": 5, "collaborator_id": 1, "date": "2020-02-03", "type": constants.TYPE_REVENUE, "description": "Report revenue", "original_amount": 1234.0, "collaborator_share": 1.0, "chargeable_amount": 1234.0, "transferwise_transaction_id": None, "report_id": 1, "created_date": datetime(2020, 2, 3, 4, 5, 6).isoformat(), "voided_transaction_id": None, "credited_payment_id": None, "currency": "USD", "transferwise_batch_id": None, "transferwise_transaction_status": None, "deleted_date": None, "current_balance": 0, "statement_period_id": 1, "creation_batch_uuid": None, }, { "id": 3, "collaborator_id": 1, "date": "2019-11-10", "type": constants.TYPE_EXPENSE, "description": "Expense", "original_amount": -100.0, "collaborator_share": 1.0, "chargeable_amount": -100.0, "transferwise_transaction_id": None, "report_id": None, "created_date": datetime(2019, 11, 10, 9, 8, 7).isoformat(), "voided_transaction_id": None, "credited_payment_id": None, "currency": "EUR", "transferwise_batch_id": None, "transferwise_transaction_status": None, "deleted_date": None, "current_balance": 0, "statement_period_id": 1, "creation_batch_uuid": None, }, ]