Ejemplo n.º 1
0
def test_ping_no_auth():
    fm_obj = FreshMail('any_key', 'any_secret')
    try:
        fm_obj.ping()
        assert False
    except FreshMailException:
        pass
Ejemplo n.º 2
0
def test_bad_method():
    fm_obj = FreshMail('any_key', 'any_secret')
    try:
        fm_obj.ping(method='PUT')
        assert False
    except FreshMailException:
        pass
Ejemplo n.º 3
0
def test_ping_no_auth():
    fm_obj = FreshMail('any_key', 'any_secret')
    try:
        res = fm_obj.ping()
        assert False
    except FreshMailException:
        pass
Ejemplo n.º 4
0
def test_bad_method():
    fm_obj = FreshMail('any_key', 'any_secret')
    try:
        fm_obj.ping(method='PUT')
        assert False
    except FreshMailException:
        pass
Ejemplo n.º 5
0
def test_init():
    fm_obj = FreshMail('any_key', 'any_secret')
    assert fm_obj.get_raw_response() == ''
    assert fm_obj.get_response() == ''
    assert fm_obj.get_errors() is None
    assert fm_obj.get_http_code() == 200
Ejemplo n.º 6
0
def test_init():
    fm_obj = FreshMail('any_key', 'any_secret')
    assert fm_obj.get_raw_response() == ''
    assert fm_obj.get_response() == ''
    assert fm_obj.get_errors() is None
    assert fm_obj.get_http_code() == 200