-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
WAZO-4044: Queue destination details #254
WAZO-4044: Queue destination details #254
Conversation
Build failed. ❌ tox-linters FAILURE in 6m 32s |
|
Build succeeded. ✔️ tox-linters SUCCESS in 6m 51s |
@alikazemkhanloo Thank you for your contribution. Please update the AUTHORS file in this repository with your name and email, or the name of the organisation in the name of which you are submitting this contribution. |
My E2E testing confirms this works well under these scenarios:
the |
expected_properties = dict( | ||
source_name='John Conner', | ||
source_exten='0012345678910', | ||
requested_exten='8083339999', | ||
destination_exten='8083339999', | ||
destination_name='SUPPORT', | ||
direction='inbound', | ||
) | ||
|
||
assert { | ||
prop: getattr(call_logs[0], prop) for prop in expected_properties | ||
} == expected_properties |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This doesn't check the destination_details.
expected_properties = dict( | |
source_name='John Conner', | |
source_exten='0012345678910', | |
requested_exten='8083339999', | |
destination_exten='8083339999', | |
destination_name='SUPPORT', | |
direction='inbound', | |
) | |
assert { | |
prop: getattr(call_logs[0], prop) for prop in expected_properties | |
} == expected_properties | |
call_log, = call_logs | |
expected_properties = dict( | |
source_name='John Conner', | |
source_exten='0012345678910', | |
requested_exten='8083339999', | |
destination_exten='8083339999', | |
destination_name='SUPPORT', | |
direction='inbound', | |
destination_details={ | |
'type': 'queue', | |
'queue_id': 1, | |
'queue_name': 'SUPPORT' | |
} | |
) | |
assert all(getattr(call_log, 'destination_details_dict' if expected_prop == 'destination_details' else prop) == expected_value for expected_prop, expected_value in expected_properties) |
Note also my suggested reformulation of the assertion.
destination_details_dict
is a "property" method on CallLog
class to expose destination_details
table rows as a dictionary.
See https://mm.wazo.community/wazo-platform/pl/ouz57cb75frjue7xiqmguqcnta.
|
Add queue name and id to CDR.
Depends on: wazo-platform/xivo-config#137