Example #1
0
def company_competition(campaign):
    with Mom(
            "dpnk.Competition",
            competitor_type="company",
            campaign=campaign,
    ) as o:
        yield o
Example #2
0
def liberos_competition(campaign):
    with Mom(
            "dpnk.Competition",
            competitor_type="liberos",
            campaign=campaign,
    ) as o:
        yield o
Example #3
0
def single_user_competition(campaign):
    with Mom(
            "dpnk.Competition",
            competitor_type="single_user",
            campaign=campaign,
    ) as o:
        yield o
Example #4
0
def team_competition(campaign):
    with Mom(
            "dpnk.Competition",
            competitor_type="team",
            campaign=campaign,
    ) as o:
        yield o
Example #5
0
def team(campaign):
    with Mom(
            "dpnk.Team",
            name="Foo team",
            campaign=campaign,
    ) as o:
        yield o
Example #6
0
def frequency_competition_city(campaign, city):
    with Mom(
            "dpnk.Competition",
            competition_type="frequency",
            competitor_type="single_user",
            campaign=campaign,
            city=[city],
    ) as o:
        yield o
Example #7
0
def frequency_competition_city_team(city, campaign):
    with Mom(
            "dpnk.Competition",
            competition_type="frequency",
            competitor_type="company",
            campaign=campaign,
            city=[city],
    ) as o:
        yield o
Example #8
0
def frequency_competition_company(campaign):
    with Mom(
            "dpnk.Competition",
            competition_type="frequency",
            competitor_type="company",
            campaign=campaign,
            company__name="Foo company",
    ) as o:
        yield o
Example #9
0
def team_frequency_competition_city(campaign, city):
    with Mom(
            "dpnk.Competition",
            competition_type="frequency",
            competitor_type="team",
            campaign=campaign,
            city=[city],
    ) as o:
        yield o
Example #10
0
def competition_phase(campaign):
    with Mom(
            "dpnk.Phase",
            phase_type="competition",
            date_from=datetime.date(year=2010, month=11, day=1),
            date_to=datetime.date(year=2010, month=11, day=30),
            campaign=campaign,
    ) as o:
        yield o
Example #11
0
def mens_frequency_competition_company(campaign):
    with Mom(
            "dpnk.Competition",
            competition_type="frequency",
            competitor_type="single_user",
            campaign=campaign,
            sex="male",
            company__name="Foo company",
    ) as o:
        yield o
Example #12
0
def competition(campaign):
    with Mom(
            "dpnk.Competition",
            competition_type="frequency",
            competitor_type="team",
            date_from=datetime.date(year=2010, month=11, day=1),
            date_to=datetime.date(year=2010, month=11, day=15),
            minimum_rides_base=23,
    ) as o:
        yield o
Example #13
0
def ua2(team, campaign, competition_phase):
    with Mom(
            "dpnk.UserAttendance",
            userprofile__nickname="Bar user",
            team=team,
            campaign=campaign,
            approved_for_team="approved",
    ) as o:
        Team.objects.get(pk=team.pk).save()
        yield o
Example #14
0
def company(db):
    with Mom(
            "dpnk.Company",
            name="Foo company",
    ) as o:
        yield o
Example #15
0
def city(db):
    with Mom("dpnk.City", name="City 1") as o:
        yield o