示例#1
0
def test_should_be_raise_if_unrecognised_status_code():
    with pytest.raises(KeyError) as e:
        get_twilio_responses('unknown_status')
    assert 'unknown_status' in str(e.value)
示例#2
0
def test_should_return_correct_details_for_technical_failure():
    get_twilio_responses('failed') == 'technical-failure'
示例#3
0
def test_should_return_correct_details_for_bounce():
    get_twilio_responses('undelivered') == 'permanent-failure'
示例#4
0
def test_should_return_correct_details_for_delivery():
    get_twilio_responses('delivered') == 'delivered'
示例#5
0
def test_should_return_correct_details_for_sending(status):
    get_twilio_responses(status) == 'sending'
def test_should_return_correct_details_for_sent():
    assert get_twilio_responses('sent') == 'sent'