Exemplo n.º 1
0
def test_birthday_does_not_parse(tmpdir):
    dbpath = str(tmpdir) + '/khal.db'
    db = backend.SQLiteDb_Birthdays('home', dbpath, locale=locale)
    assert list(db.get_allday_range(date(1971, 3, 11))) == list()
    db.update(card_does_not_parse, 'unix.vcf')
    events = list(db.get_allday_range(date(1971, 3, 11)))
    assert len(events) == 0
Exemplo n.º 2
0
def test_birthdays_no_year(tmpdir):
    dbpath = str(tmpdir) + '/khal.db'
    db = backend.SQLiteDb_Birthdays('home', dbpath, locale=locale)
    assert list(db.get_allday_range(date(1971, 3, 11))) == list()
    db.update(card_no_year, 'unix.vcf')
    events = list(db.get_allday_range(date(1971, 3, 11)))
    assert len(events) == 1
    assert unicode_type(events[0].vevent['SUMMARY']) == u'Unix\'s birthday'
Exemplo n.º 3
0
def test_birthdays_no_year(tmpdir):
    dbpath = str(tmpdir) + '/khal.db'
    db = backend.SQLiteDb_Birthdays('home', dbpath, locale=LOCALE_BERLIN)
    assert list(db.get_allday_range(date(1971, 3, 11))) == list()
    db.update(card_no_year, 'unix.vcf')
    events = list(db.get_allday_range(date(1971, 3, 11)))
    assert len(events) == 1
    assert events[0].summary == u'Unix\'s birthday'