1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
|
= A test which reproduces bug 249185 =
Create some teams.
>>> person = factory.makePerson()
>>> beta_testers = factory.makeTeam(person)
>>> devs = factory.makeTeam(person)
>>> adjutants = factory.makeTeam(person)
>>> login_person(person)
>>> dev1 = factory.makePerson()
>>> ignored = devs.addMember(dev1, person)
Beta testers has lp-devs and adjutants as members.
>>> ignored = beta_testers.addMember(devs, person, force_team_add=True)
>>> ignored = beta_testers.addMember(
... adjutants, person, force_team_add=True)
>>> dev1.hasParticipationEntryFor(beta_testers)
True
Adjutants has lp-devs as member.
>>> ignored = adjutants.addMember(devs, person, force_team_add=True)
>>> dev1.hasParticipationEntryFor(adjutants)
True
Members of lp-devs are not direct members in beta-testers but are
participants.
>>> dev1 in beta_testers.activemembers
False
>>> dev1.hasParticipationEntryFor(beta_testers)
True
>>> from lp.registry.interfaces.teammembership import (
... TeamMembershipStatus)
>>> adjutants.setMembershipData(
... devs, TeamMembershipStatus.DEACTIVATED, person)
lp-devs has left adjutants, so its members are not participants of
adjutants anymore.
>>> dev1.hasParticipationEntryFor(adjutants)
False
They should still be participants in beta-testers, though.
>>> dev1.hasParticipationEntryFor(beta_testers)
True
|