~launchpad-pqm/launchpad/devel

« back to all changes in this revision

Viewing changes to lib/lp/bugs/doc/checkwatches-cli-switches.txt

  • Committer: Launchpad Patch Queue Manager
  • Date: 2011-09-19 23:43:35 UTC
  • mfrom: (13970.10.13 ztm-murder)
  • Revision ID: launchpad@pqm.canonical.com-20110919234335-wl2iifzeioub5uhc
[r=sinzui][no-qa] Stripped of its transaction management
 functionality,
 ZopelessTransactionManager is demoted to a mere database configuration
 manager.

Show diffs side-by-side

added added

removed removed

Lines of Context:
5
5
the updateBugTrackers() method.
6
6
 
7
7
    >>> import transaction
8
 
    >>> from canonical.database.sqlbase import (
9
 
    ...     cursor, sqlvalues, ZopelessTransactionManager)
 
8
    >>> from canonical.database.sqlbase import cursor, sqlvalues
10
9
    >>> from canonical.database.constants import UTC_NOW
11
10
    >>> from lp.services.log.logger import FakeLogger
12
11
    >>> from lp.bugs.scripts.checkwatches import CheckwatchesMaster
19
18
    ...     sqlvalues(UTC_NOW))
20
19
    >>> transaction.commit()
21
20
 
22
 
    >>> transactionmgr = ZopelessTransactionManager._installed
23
 
    >>> updater = CheckwatchesMaster(transactionmgr, logger=FakeLogger())
 
21
    >>> updater = CheckwatchesMaster(transaction, logger=FakeLogger())
24
22
 
25
23
    >>> updater.updateBugTrackers(['debbugs', 'gnome-bugzilla'])
26
24
    DEBUG...No watches to update on http://bugs.debian.org
52
50
    ...     def __init__(self, name, dbuser=None, test_args=None):
53
51
    ...         super(TestCheckWatchesCronScript, self).__init__(
54
52
    ...             name, dbuser, test_args)
55
 
    ...         self.txn = ZopelessTransactionManager
 
53
    ...         self.txn = transaction
56
54
    ...
57
55
    ...     def handle_options(self):
58
56
    ...         self.logger = FakeLogger()