~launchpad-pqm/launchpad/devel

« back to all changes in this revision

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

  • Committer: Launchpad Patch Queue Manager
  • Date: 2011-09-26 04:31:38 UTC
  • mfrom: (14022.3.15 death-of-ztm)
  • Revision ID: launchpad@pqm.canonical.com-20110926043138-ayaqooupc9vuifpw
[r=lifeless][bug=396419, 484033] Fear not,
        for ZopelessTransactionManager is no longer.

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')