Esempio n. 1
0
def my_team(group):
    a_team = models.Team(name='A-Team', slug='ATM', group=group)

    with username_on_model(models.Team, 'initial'):
        a_team.save()

    return a_team
Esempio n. 2
0
def my_other_team(my_other_group):
    a_team = models.Team(name='B-Team', slug='BTM', group=my_other_group)

    with username_on_model(models.Team, 'initial'):
        a_team.save()

    return a_team
Esempio n. 3
0
def not_my_team(not_my_group):
    z_team = models.Team(name='Z-Team', slug='ZTM', group=not_my_group)

    with username_on_model(models.Team, 'initial'):
        z_team.save()

    return z_team
Esempio n. 4
0
def my_team(group, not_my_team):
    team = models.Team(name="A-Team", slug="ATM", group=group)

    with username_on_model(models.Team, "initial"):
        team.save()

    return team
Esempio n. 5
0
def not_my_team(not_my_group):
    team = models.Team(name="Z-Team", slug="ZTM", group=not_my_group)

    with username_on_model(models.Team, "initial"):
        team.save()

    return team
Esempio n. 6
0
def deactivated_team(my_group):
    team = models.Team(name="Deactivated-Team", slug="DTM", group=my_group)
    team.deleted = True
    with username_on_model(models.Team, "deactivator"):
        team.save()

    return team
Esempio n. 7
0
def my_other_team(my_other_group):
    team = models.Team(name="B-Team", slug="BTM", group=my_other_group)

    with username_on_model(models.Team, "initial"):
        team.save()

    return team