Exemplo n.º 1
0
def test1_0():
    print("Test1_0 - level 0 peeps")

    context = mycontext.newContext()

    #context = peeps.loadPeepFile(context, '../hoh-people.json')
    context = mycontext.setPeepFile(context, '../hoh-people.json')

    items = peeps.getBirthdayList(context, "0", "365", "365", "True")
    print("Peeps matched")
    for item in items:
        print("peep " + peeps.getPreferredName(item) + " birthday is in " +
              item['daysAway'] + " days")
    assert (len(items) >= 0)

    return
Exemplo n.º 2
0
def test1_4():
    context = None

    print("Test1_4 - level * (ALL) peeps")

    #print("context (before) = " + str(context))
    #   context = peeps.loadPeepFile(context, '../hoh-people.json')
    context = mycontext.setPeepFile(context, '../hoh-people.json')
    #print("context (after) = " + str(context))

    items = peeps.getBirthdayList(context, "*", "180", "181", "True")
    print("Peeps matched")
    for item in items:
        print("peep " + peeps.getPreferredName(item) + " birthday is in " +
              item['daysAway'] + " days")
    assert (len(items) >= 0)
    return