Ejemplo n.º 1
0
def test_initial(db):
    remote = default_event(db.session)
    remote.participant_list = [{
        'email': '*****@*****.**',
        'status': 'noreply'
    }, {
        'email': '*****@*****.**',
        'status': 'noreply'
    }, {
        'email': '*****@*****.**',
        'status': 'noreply'
    }]

    local = Event(namespace_id=NAMESPACE_ID,
                  calendar=default_calendar(db.session),
                  provider_name='inbox',
                  raw_data='',
                  read_only=False,
                  all_day=False,
                  source='local')
    local.copy_from(remote)
    local.source = 'local'
    assert len(local.participants) == 3
    assert len(remote.participants) == 3
    db.session.add_all([local, remote])

    local.copy_from(remote)
    assert len(local.participants) == 3
    assert len(remote.participants) == 3
Ejemplo n.º 2
0
def test_initial(db):
    remote = _default_event()
    remote.participant_list = [
        {'email': '*****@*****.**',
         'status': 'awaiting'},
        {'email': '*****@*****.**',
         'status': 'awaiting'},
        {'email': '*****@*****.**',
         'status': 'awaiting'}]

    local = Event()
    local.copy_from(remote)
    local.source = 'local'
    assert len(local.participants) == 3
    assert len(remote.participants) == 3
    db.session.add_all([local, remote])

    local.copy_from(remote)
    assert len(local.participants) == 3
    assert len(remote.participants) == 3
Ejemplo n.º 3
0
def test_initial(db):
    remote = _default_event(db)
    remote.participant_list = [
        {'email': '*****@*****.**',
         'status': 'noreply'},
        {'email': '*****@*****.**',
         'status': 'noreply'},
        {'email': '*****@*****.**',
         'status': 'noreply'}]

    local = Event(account_id=ACCOUNT_ID,
                  calendar=_default_calendar(db))
    local.copy_from(remote)
    local.source = 'local'
    assert len(local.participants) == 3
    assert len(remote.participants) == 3
    db.session.add_all([local, remote])

    local.copy_from(remote)
    assert len(local.participants) == 3
    assert len(remote.participants) == 3
Ejemplo n.º 4
0
def test_initial(db):
    remote = default_event(db)
    remote.participant_list = [
        {'email': '*****@*****.**',
         'status': 'noreply'},
        {'email': '*****@*****.**',
         'status': 'noreply'},
        {'email': '*****@*****.**',
         'status': 'noreply'}]

    local = Event(account_id=ACCOUNT_ID,
                  calendar=default_calendar(db),
                  provider_name='inbox', raw_data='',
                  read_only=False, all_day=False,
                  source='local')
    local.copy_from(remote)
    local.source = 'local'
    assert len(local.participants) == 3
    assert len(remote.participants) == 3
    db.session.add_all([local, remote])

    local.copy_from(remote)
    assert len(local.participants) == 3
    assert len(remote.participants) == 3