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)
def test_should_return_correct_details_for_technical_failure(): get_twilio_responses('failed') == 'technical-failure'
def test_should_return_correct_details_for_bounce(): get_twilio_responses('undelivered') == 'permanent-failure'
def test_should_return_correct_details_for_delivery(): get_twilio_responses('delivered') == 'delivered'
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'