~launchpad-pqm/launchpad/devel

« back to all changes in this revision

Viewing changes to lib/lp/registry/browser/tests/peoplemerge-views.txt

  • Committer: Curtis Hovey
  • Date: 2011-03-25 13:44:19 UTC
  • mto: This revision was merged to the branch mainline in revision 12665.
  • Revision ID: curtis.hovey@canonical.com-20110325134419-h1h8bj4bgbc403tk
Removed team purge rules from merge views.
Removed unneeded calls to flush().

Show diffs side-by-side

added added

removed removed

Lines of Context:
39
39
    >>> print person_set.getByName('ubuntu-team').displayname
40
40
    Ubuntu Team
41
41
 
42
 
Teams which have superteams cannot be merged into other teams. This
43
 
restriction was added as a fix to https://bugs.launchpad.net/bugs/290681.
44
 
 
45
 
    >>> parent_team = factory.makeTeam()
46
 
    >>> child_team = factory.makeTeam(name='child-team')
47
 
    >>> random_team = factory.makeTeam()
48
 
    >>> transaction.commit()
49
 
    >>> login('foo.bar@canonical.com')
50
 
    >>> ignored = parent_team.addMember(
51
 
    ...     child_team, reviewer=parent_team.teamowner, force_team_add=True)
52
 
    >>> form = {'field.dupe_person': child_team.name,
53
 
    ...         'field.target_person': random_team.name,
54
 
    ...         'field.actions.deactivate_members_and_merge': 'Merge'}
55
 
    >>> view = create_initialized_view(
56
 
    ...     person_set, '+adminteammerge', form=form)
57
 
    >>> view.errors
58
 
    [u"child-team has super teams, so it can't be merged."]
59
 
 
60
42
Attempting to merge a non-existent team results in an error.
61
43
 
 
44
    >>> transaction.commit()
62
45
    >>> form = {'field.dupe_person': 'not-a-real-team',
63
46
    ...         'field.target_person': 'another-fake-team',
64
47
    ...         'field.actions.merge': 'Merge'}