~launchpad-pqm/launchpad/devel

« back to all changes in this revision

Viewing changes to lib/lp/bugs/tests/bugtarget-bugcount.txt

  • Committer: Launchpad Patch Queue Manager
  • Date: 2011-06-29 01:49:37 UTC
  • mfrom: (13316.3.4 syncUpdate-huh)
  • Revision ID: launchpad@pqm.canonical.com-20110629014937-h26dx50bi1s1jz6q
[r=jml][no-qa] Remove syncUpdate.

Show diffs side-by-side

added added

removed removed

Lines of Context:
69
69
If we take a bug that is in one status and changes it to another, the
70
70
former status' count will of course decrease, and the latter's increase.
71
71
 
72
 
    >>> from canonical.launchpad.ftests import syncUpdate
73
72
    >>> bug = filebug(bugtarget, "Test Bug", status=BugTaskStatus.CONFIRMED)
74
73
    >>> Store.of(bug).flush()
75
74
    >>> old_counts = bugtarget.getBugCounts(None)
78
77
    ...         break
79
78
    >>> bugtask.transitionToStatus(
80
79
    ...     BugTaskStatus.INCOMPLETE, getUtility(ILaunchBag).user)
81
 
    >>> syncUpdate(bugtask)
 
80
    >>> Store.of(bugtask).flush()
82
81
    >>> new_bug_counts = bugtarget.getBugCounts(None)
83
82
    >>> print_count_difference(
84
83
    ...     new_bug_counts, old_counts, BugTaskStatus.CONFIRMED)
98
97
    >>> old_counts = bugtarget.getBugCounts(None)
99
98
    >>> bug.setPrivate(True, getUtility(ILaunchBag).user)
100
99
    True
101
 
    >>> syncUpdate(bug)
 
100
    >>> Store.of(bug).flush()
102
101
    >>> sample_person_counts = bugtarget.getBugCounts(
103
102
    ...     getUtility(IPersonSet).getByEmail('test@canonical.com'))
104
103
    >>> nopriv_counts = bugtarget.getBugCounts(
118
117
 
119
118
    >>> bug.setPrivate(False, getUtility(ILaunchBag).user)
120
119
    True
121
 
    >>> syncUpdate(bug)
 
120
    >>> Store.of(bug).flush()
 
121
 
122
122
 
123
123
== Duplicate Bugs ==
124
124
 
130
130
    >>> Store.of(another_bug).flush()
131
131
    >>> old_counts = bugtarget.getBugCounts(None)
132
132
    >>> another_bug.markAsDuplicate(bug)
133
 
    >>> syncUpdate(another_bug)
134
133
    >>> new_counts = bugtarget.getBugCounts(None)
135
134
    >>> print_count_difference(
136
135
    ...     new_counts, old_counts, BugTaskStatus.NEW)