示例#1
0
def test_auth_error_handling(contact_sync, db):
    """Test that the contact sync greenlet stops if account credentials are
    invalid."""
    # Give the default test account patently invalid OAuth credentials.
    default_account.refresh_token = 'foo'
    db.session.commit()

    contact_sync.start()
    contact_sync.join(timeout=5)
    assert contact_sync.successful(), "contact sync greenlet didn't terminate."
示例#2
0
def test_auth_error_handling(contact_sync, db):
    """Test that the contact sync greenlet stops if account credentials are
    invalid."""
    # Give the default test account patently invalid OAuth credentials.
    default_account.refresh_token = 'foo'
    db.session.commit()

    contact_sync.start()
    contact_sync.join(timeout=5)
    assert contact_sync.successful(), "contact sync greenlet didn't terminate."