def company_competition(campaign): with Mom( "dpnk.Competition", competitor_type="company", campaign=campaign, ) as o: yield o
def liberos_competition(campaign): with Mom( "dpnk.Competition", competitor_type="liberos", campaign=campaign, ) as o: yield o
def single_user_competition(campaign): with Mom( "dpnk.Competition", competitor_type="single_user", campaign=campaign, ) as o: yield o
def team_competition(campaign): with Mom( "dpnk.Competition", competitor_type="team", campaign=campaign, ) as o: yield o
def team(campaign): with Mom( "dpnk.Team", name="Foo team", campaign=campaign, ) as o: yield o
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
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
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
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
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
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
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
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
def company(db): with Mom( "dpnk.Company", name="Foo company", ) as o: yield o
def city(db): with Mom("dpnk.City", name="City 1") as o: yield o