-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
e101cc0
commit ae1b210
Showing
4 changed files
with
106 additions
and
102 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -101,55 +101,53 @@ def test_flatten_record(): | |
|
||
} | ||
res = flatten_record(record) | ||
assert res == { | ||
"entries": [ | ||
{ | ||
'fieldId': 'field_id_1', | ||
'fieldName': 'field_name_1', | ||
'quotaValue': None, | ||
'timeFrameId': 'TF:2024-03-01', | ||
'timeFrameStartDate': '2024-03-01', | ||
'timeFrameEndDate': '2024-03-07', | ||
'timePeriodCrmId': 'crm_id_3', | ||
'timePeriodType': 'quarter', | ||
'timePeriodLabel': 'Q1', | ||
'year': '2024', | ||
'timePeriodStartDate': '2024-01-01', | ||
'timePeriodEndDate': '2024-03-31', | ||
'timePeriodId': '2024_Q1', | ||
'userId': 'user_id_1', | ||
'userName': 'name_1', | ||
'userEmail': '[email protected]', | ||
'scopeId': '{"type":"blah"}', | ||
'userCrmId': 'crm_id_1', | ||
'hierarchyId': 'bar', | ||
'hierarchyName': 'spam', | ||
'parentHierarchyId': 'foo', | ||
'parentHierarchyName': 'eggs', | ||
}, | ||
{ | ||
'fieldId': 'field_id_2', | ||
'fieldName': 'field_name_2', | ||
'quotaValue': None, | ||
'timeFrameId': 'TF:2024-03-01', | ||
'timeFrameStartDate': '2024-03-01', | ||
'timeFrameEndDate': '2024-03-07', | ||
'timePeriodCrmId': 'crm_id_3', | ||
'timePeriodType': 'quarter', | ||
'timePeriodLabel': 'Q1', | ||
'year': '2024', | ||
'timePeriodStartDate': '2024-01-01', | ||
'timePeriodEndDate': '2024-03-31', | ||
'timePeriodId': '2024_Q1', | ||
'userId': 'user_id_1', | ||
'userName': 'name_1', | ||
'userEmail': '[email protected]', | ||
'scopeId': '{"type":"blah"}', | ||
'userCrmId': 'crm_id_1', | ||
'hierarchyId': 'bar', | ||
'hierarchyName': 'spam', | ||
'parentHierarchyId': 'foo', | ||
'parentHierarchyName': 'eggs', | ||
}, | ||
] | ||
} | ||
assert res == [ | ||
{ | ||
'fieldId': 'field_id_1', | ||
'fieldName': 'field_name_1', | ||
'quotaValue': None, | ||
'timeFrameId': 'TF:2024-03-01', | ||
'timeFrameStartDate': '2024-03-01', | ||
'timeFrameEndDate': '2024-03-07', | ||
'timePeriodCrmId': 'crm_id_3', | ||
'timePeriodType': 'quarter', | ||
'timePeriodLabel': 'Q1', | ||
'year': '2024', | ||
'timePeriodStartDate': '2024-01-01', | ||
'timePeriodEndDate': '2024-03-31', | ||
'timePeriodId': '2024_Q1', | ||
'userId': 'user_id_1', | ||
'userName': 'name_1', | ||
'userEmail': '[email protected]', | ||
'scopeId': '{"type":"blah"}', | ||
'userCrmId': 'crm_id_1', | ||
'hierarchyId': 'bar', | ||
'hierarchyName': 'spam', | ||
'parentHierarchyId': 'foo', | ||
'parentHierarchyName': 'eggs', | ||
}, | ||
{ | ||
'fieldId': 'field_id_2', | ||
'fieldName': 'field_name_2', | ||
'quotaValue': None, | ||
'timeFrameId': 'TF:2024-03-01', | ||
'timeFrameStartDate': '2024-03-01', | ||
'timeFrameEndDate': '2024-03-07', | ||
'timePeriodCrmId': 'crm_id_3', | ||
'timePeriodType': 'quarter', | ||
'timePeriodLabel': 'Q1', | ||
'year': '2024', | ||
'timePeriodStartDate': '2024-01-01', | ||
'timePeriodEndDate': '2024-03-31', | ||
'timePeriodId': '2024_Q1', | ||
'userId': 'user_id_1', | ||
'userName': 'name_1', | ||
'userEmail': '[email protected]', | ||
'scopeId': '{"type":"blah"}', | ||
'userCrmId': 'crm_id_1', | ||
'hierarchyId': 'bar', | ||
'hierarchyName': 'spam', | ||
'parentHierarchyId': 'foo', | ||
'parentHierarchyName': 'eggs', | ||
}, | ||
] |