Skip to content

Commit

Permalink
fixtures
Browse files Browse the repository at this point in the history
  • Loading branch information
anishfyle committed Nov 26, 2024
1 parent 583ce47 commit 5ab1894
Show file tree
Hide file tree
Showing 3 changed files with 57 additions and 27 deletions.
1 change: 1 addition & 0 deletions apps/fyle/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,7 @@ def create_expense_objects(expenses: List[Dict], workspace_id: int, skip_update:
'purpose': expense['purpose'],
'report_id': expense['report_id'],
'corporate_card_id': expense['corporate_card_id'],
'masked_corporate_card_number': expense['masked_corporate_card_number'],
'bank_transaction_id': expense['bank_transaction_id'],
'file_ids': expense['file_ids'],
'spent_at': expense['spent_at'],
Expand Down
80 changes: 54 additions & 26 deletions tests/test_fyle/fixtures.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
},
'posted_at': '2024-05-10T07:53:25',
'is_posted_at_null': False,
'masked_corporate_card_number': '**** 4567',
'activity_details': None,
'added_to_report_at': None,
'admin_amount': None,
Expand Down Expand Up @@ -242,7 +243,8 @@
'tax_group_id': None,
'previous_export_state': None,
'accounting_export_summary': [],
'is_posted_at_null': False
'is_posted_at_null': False,
'masked_corporate_card_number': '**** 4567',
},
"expenses_spent_at":[
{
Expand Down Expand Up @@ -286,7 +288,8 @@
'Vehicle Type': '',
'Fyle Categories': '',
},
'is_posted_at_null': False
'is_posted_at_null': False,
'masked_corporate_card_number': '**** 4567',
},
{
'id': '1235',
Expand Down Expand Up @@ -329,7 +332,8 @@
'Vehicle Type': '',
'Fyle Categories': '',
},
'is_posted_at_null': True
'is_posted_at_null': True,
'masked_corporate_card_number': '**** 4567',
},
{
'id': '1236',
Expand Down Expand Up @@ -372,7 +376,8 @@
'Vehicle Type': '',
'Fyle Categories': '',
},
'is_posted_at_null': True
'is_posted_at_null': True,
'masked_corporate_card_number': '**** 4567',
},
],

Expand Down Expand Up @@ -503,7 +508,8 @@
"Vehicle Type": "",
"Fyle Categories": ""
},
"is_posted_at_null": False
'is_posted_at_null': False,
'masked_corporate_card_number': '**** 4567',
},
{
"id": "1265",
Expand Down Expand Up @@ -547,7 +553,8 @@
"Vehicle Type": "",
"Fyle Categories": ""
},
"is_posted_at_null": False
'is_posted_at_null': False,
'masked_corporate_card_number': '**** 4567',
},
],
'expense_refund_single_ccc':{
Expand Down Expand Up @@ -592,7 +599,8 @@
"Vehicle Type": "",
"Fyle Categories": ""
},
"is_posted_at_null": False
'is_posted_at_null': False,
'masked_corporate_card_number': '**** 4567',
},
'expense_refund_single':{
"id": "1265",
Expand Down Expand Up @@ -628,7 +636,8 @@
"spent_at": "2021-12-22T17:00:00",
"approved_at": "2021-12-22T07:30:26.289842+00:00",
"posted_at": None,
"is_posted_at_null": True,
'is_posted_at_null': False,
'masked_corporate_card_number': '**** 4567',
"expense_created_at": "2021-12-23T07:14:13.990650+00:00",
"expense_updated_at": "2021-12-27T05:26:43.954470+00:00",
"source_account_type": "PERSONAL_CASH_ACCOUNT",
Expand Down Expand Up @@ -681,7 +690,8 @@
"Vehicle Type": "",
"Fyle Categories": ""
},
"is_posted_at_null": False
'is_posted_at_null': False,
'masked_corporate_card_number': '**** 4567',
},
{
"id": "1111",
Expand Down Expand Up @@ -725,7 +735,8 @@
"Vehicle Type": "",
"Fyle Categories": ""
},
"is_posted_at_null": False
'is_posted_at_null': False,
'masked_corporate_card_number': '**** 4567',
}
],
"skipped_expenses": {
Expand Down Expand Up @@ -955,7 +966,8 @@
'paid_on_qbo': False,
'created_at': '2024-06-18T19:12:17.003409+00:00',
'updated_at': '2024-06-18T19:12:17.003421+00:00',
'is_posted_at_null': False
'is_posted_at_null': False,
'masked_corporate_card_number': '**** 4567',
},
{
'id': '24009',
Expand Down Expand Up @@ -1007,7 +1019,8 @@
'paid_on_qbo': False,
'created_at': '2024-06-18T19:12:17.020617+00:00',
'updated_at': '2024-06-18T19:12:17.020627+00:00',
'is_posted_at_null': False
'is_posted_at_null': False,
'masked_corporate_card_number': '**** 4567',
}
],
'ccc_expenses_split_same_bank_transaction_id': [
Expand Down Expand Up @@ -1058,7 +1071,8 @@
'created_at': '2024-06-18T19:12:17.003409+00:00',
'updated_at': '2024-06-18T19:12:17.003421+00:00',
'bank_transaction_id': 'anish',
'is_posted_at_null': False
'is_posted_at_null': False,
'masked_corporate_card_number': '**** 4567',
},
{
'id': '24009',
Expand Down Expand Up @@ -1110,7 +1124,8 @@
'created_at': '2024-06-18T19:12:17.020617+00:00',
'updated_at': '2024-06-18T19:12:17.020627+00:00',
'bank_transaction_id': 'anish',
'is_posted_at_null': False
'is_posted_at_null': False,
'masked_corporate_card_number': '**** 4567',
}
],
'ccc_expenses_split_diff_bank_transaction_id': [
Expand Down Expand Up @@ -1162,7 +1177,8 @@
'updated_at': '2024-06-18T19:12:17.003421+00:00',
'bank_transaction_id': 'Arkham',
'fund_source': 'CCC',
'is_posted_at_null': False
'is_posted_at_null': False,
'masked_corporate_card_number': '**** 4567',
},
{
'id': '24004',
Expand Down Expand Up @@ -1215,7 +1231,8 @@
'updated_at': '2024-06-18T19:12:17.003421+00:00',
'bank_transaction_id': 'Arkham',
'fund_source': 'CCC',
'is_posted_at_null': False
'is_posted_at_null': False,
'masked_corporate_card_number': '**** 4567',
},
{
'id': '24008',
Expand Down Expand Up @@ -1265,7 +1282,8 @@
'updated_at': '2024-06-18T19:12:17.003421+00:00',
'bank_transaction_id': 'Anish',
'fund_source': 'CCC',
'is_posted_at_null': False
'is_posted_at_null': False,
'masked_corporate_card_number': '**** 4567',
},
{
'id': '24009',
Expand Down Expand Up @@ -1318,7 +1336,8 @@
'updated_at': '2024-06-18T19:12:17.003421+00:00',
'bank_transaction_id': 'Anish',
'fund_source': 'CCC',
'is_posted_at_null': False
'is_posted_at_null': False,
'masked_corporate_card_number': '**** 4567',
}
],
'expense_groups_complete_response': {
Expand Down Expand Up @@ -1570,7 +1589,8 @@
'custom_properties': {},
'paid_on_qbo': False,
'payment_number': 'P/2022/05/R/4',
'is_posted_at_null': False
'is_posted_at_null': False,
'masked_corporate_card_number': '**** 4567',
}
],
'fund_source': 'PERSONAL',
Expand Down Expand Up @@ -1664,7 +1684,8 @@
'custom_properties': {},
'paid_on_qbo': False,
'payment_number': 'P/2022/05/R/5',
'is_posted_at_null': False
'is_posted_at_null': False,
'masked_corporate_card_number': '**** 4567',
}
],
'fund_source': 'PERSONAL',
Expand Down Expand Up @@ -2087,7 +2108,8 @@
'exported_at': '2022-05-23T13:03:37.501808Z',
'updated_at': '2022-05-23T13:03:37.502024Z',
'workspace': 3,
'is_posted_at_null': False
'is_posted_at_null': False,
'masked_corporate_card_number': '**** 4567',
},
{
'id': 10,
Expand Down Expand Up @@ -2368,7 +2390,8 @@
'exported_at': '2022-05-23T13:03:15.136482Z',
'updated_at': '2022-05-23T13:03:15.136864Z',
'workspace': 3,
'is_posted_at_null': False
'is_posted_at_null': False,
'masked_corporate_card_number': '**** 4567',
},
{
'id': 9,
Expand Down Expand Up @@ -2759,7 +2782,8 @@
'exported_at': '2022-05-23T13:02:52.066735Z',
'updated_at': '2022-05-23T13:02:52.067152Z',
'workspace': 3,
'is_posted_at_null': False
'is_posted_at_null': False,
'masked_corporate_card_number': '**** 4567',
},
{
'id': 18,
Expand Down Expand Up @@ -10035,7 +10059,8 @@
'Klass': '',
},
'payment_number': 'P/2022/05/R/9',
'is_posted_at_null': False
'is_posted_at_null': False,
'masked_corporate_card_number': '**** 4567',
},
{
'id': 'txW7qE5DUF84',
Expand Down Expand Up @@ -10091,7 +10116,8 @@
'Klass': '',
},
'payment_number': 'P/2022/05/R/9',
'is_posted_at_null': False
'is_posted_at_null': False,
'masked_corporate_card_number': '**** 4567',
},
{
'id': 'txW7qE5DUF85',
Expand Down Expand Up @@ -10148,6 +10174,7 @@
},
'payment_number': 'P/2022/05/R/9',
'is_posted_at_null': True,
'masked_corporate_card_number': '**** 4567',
}
],
'expenses': [
Expand Down Expand Up @@ -10206,7 +10233,8 @@
'Klass': '',
},
'payment_number': 'P/2022/05/R/9',
'is_posted_at_null': False
'is_posted_at_null': False,
'masked_corporate_card_number': '**** 4567',
}
],
'reimbursements': [
Expand Down
3 changes: 2 additions & 1 deletion tests/test_workspaces/fixtures.py
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,8 @@
'Klass': '',
},
'payment_number': 'P/2022/05/R/14',
'is_posted_at_null': False
'is_posted_at_null': False,
'masked_corporate_card_number': '**** 4567',
}
],
'company_info': {
Expand Down

0 comments on commit 5ab1894

Please sign in to comment.