Skip to content

Commit

Permalink
adding new test for multiple workflows in verify v2
Browse files Browse the repository at this point in the history
  • Loading branch information
maxkahan committed May 26, 2023
1 parent 896f990 commit 0d1b848
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions tests/test_verify2.py
Original file line number Diff line number Diff line change
Expand Up @@ -454,6 +454,22 @@ def test_cancel_verification_error_not_found():
)


@responses.activate
def test_new_request_multiple_workflows():
stub(responses.POST, 'https://api.nexmo.com/v2/verify', fixture_path='verify2/create_request.json', status_code=202)

params = {
'brand': 'ACME, Inc',
'workflow': [
{'channel': 'whatsapp_interactive', 'to': '447700900000'},
{'channel': 'sms', 'to': '4477009999999'},
],
}
verify_request = verify2.new_request(params)

assert verify_request['request_id'] == 'c11236f4-00bf-4b89-84ba-88b25df97315'


def test_remove_unnecessary_fraud_check():
params = {'brand': 'ACME, Inc', 'workflow': [{'channel': 'sms', 'to': '447700900000'}], 'fraud_check': True}
verify2._remove_unnecessary_fraud_check(params)
Expand Down

0 comments on commit 0d1b848

Please sign in to comment.