~launchpad-pqm/launchpad/devel

« back to all changes in this revision

Viewing changes to lib/lp/answers/tests/emailinterface.txt

  • Committer: Stuart Bishop
  • Date: 2011-09-28 12:49:24 UTC
  • mfrom: (9893.10.1 trivial)
  • mto: This revision was merged to the branch mainline in revision 14178.
  • Revision ID: stuart.bishop@canonical.com-20110928124924-m5a22fymqghw6c5i
Merged trivial into distinct-db-users.

Show diffs side-by-side

added added

removed removed

Lines of Context:
108
108
    >>> no_priv = personset.getByEmail('no-priv@canonical.com')
109
109
    >>> foo_bar = personset.getByEmail('foo.bar@canonical.com')
110
110
 
 
111
    >>> import transaction
111
112
    >>> from canonical.config import config
112
 
    >>> from canonical.database.sqlbase import commit
113
113
    >>> from canonical.testing.layers import LaunchpadZopelessLayer
114
114
 
115
115
    >>> LaunchpadZopelessLayer.switchDbUser('launchpad')
119
119
    ...     "I've tried installing Ubuntu on a Mac. But the installer never "
120
120
    ...     "boots.", datecreated=now.next())
121
121
    >>> question_id = question.id
122
 
    >>> commit()
 
122
    >>> transaction.commit()
123
123
    >>> LaunchpadZopelessLayer.switchDbUser(config.processmail.dbuser)
124
124
 
125
125
    # We need to refetch the question, since a new transaction was started.
363
363
    True
364
364
    >>> print message.action.title
365
365
    Comment
 
366
    >>> transaction.abort()
366
367
 
367
368
 
368
369
Answers linked to FAQ questions
378
379
    ...     no_priv, 'Why everyone think this is weird.',
379
380
    ...     "That's an easy one. It's because it is!")
380
381
    >>> removeSecurityProxy(question).faq = faq
381
 
    >>> commit()
 
382
    >>> transaction.commit()
382
383
 
383
384
    >>> LaunchpadZopelessLayer.switchDbUser(config.processmail.dbuser)
384
385
    >>> login('no-priv@canonical.com')