예제 #1
0
def test_should_be_none_if_unrecognised_status_code():
    with pytest.raises(KeyError) as e:
        get_firetext_responses('99')
    assert '99' in str(e.value)
예제 #2
0
def test_should_return_correct_details_for_complaint():
    get_firetext_responses('2') == 'pending'
예제 #3
0
def test_should_return_correct_details_for_bounced():
    get_firetext_responses('1') == 'permanent-failure'
예제 #4
0
def test_should_return_correct_details_for_delivery():
    get_firetext_responses('0') == 'delivered'
예제 #5
0
def test_get_firetext_responses_should_return_correct_details_for_complaint():
    assert get_firetext_responses('2') == ('pending', None)
예제 #6
0
def test_get_firetext_responses_should_return_correct_details_for_bounced(
        detailed_status_code, result):
    assert get_firetext_responses('1', detailed_status_code) == result