~launchpad-pqm/launchpad/devel

« back to all changes in this revision

Viewing changes to lib/lp/registry/browser/tests/product-edit-people-view.txt

  • Committer: Launchpad Patch Queue Manager
  • Date: 2011-11-29 03:13:47 UTC
  • mfrom: (14376.2.1 better-error-open-owner)
  • Revision ID: launchpad@pqm.canonical.com-20111129031347-brf7jws1r94vw0iq
[r=sinzui][bug=893984] Change Product:+edit-people to no longer
 blindly return Zope validation errors.

Show diffs side-by-side

added added

removed removed

Lines of Context:
42
42
    >>> firefox.owner.name
43
43
    u'no-priv'
44
44
 
 
45
Ownership can not be transferred to an open team.
 
46
 
 
47
    >>> owner = factory.makePerson()
 
48
    >>> login_person(owner)
 
49
    >>> product = factory.makeProduct(owner=owner)
 
50
    >>> from lp.registry.interfaces.person import TeamSubscriptionPolicy
 
51
    >>> team = factory.makeTeam(
 
52
    ...     name='open', subscription_policy=TeamSubscriptionPolicy.OPEN)
 
53
    >>> form = {
 
54
    ...     'field.owner': 'open',
 
55
    ...     'field.actions.save': 'Save changes',
 
56
    ...     }
 
57
 
 
58
    >>> transaction.commit()
 
59
    >>> view = create_initialized_view(product, '+edit-people', form=form)
 
60
    >>> view.errors
 
61
    [u'You must choose a valid person or team to be the owner for ...']
 
62
 
45
63
 
46
64
Assigning to Registry Administrators
47
65
------------------------------------
51
69
 
52
70
    >>> login_person(sample_person)
53
71
    >>> product = factory.makeProduct(owner=sample_person)
 
72
    >>> transaction.commit()
54
73
 
55
74
    >>> form = {
56
75
    ...     'field.transfer_to_registry': 'on',
77
96
Selecting both the owner/maintainer and the checkbox is also an error.
78
97
 
79
98
    >>> product = factory.makeProduct(owner=sample_person)
 
99
    >>> transaction.commit()
80
100
    >>> form = {
81
101
    ...     'field.owner': 'no-priv',
82
102
    ...     'field.transfer_to_registry': 'on',