Merge lp:~wgrant/launchpad/testfix into lp:launchpad

Proposed by William Grant
Status: Merged
Approved by: William Grant
Approved revision: no longer in the source branch.
Merged at revision: 13757
Proposed branch: lp:~wgrant/launchpad/testfix
Merge into: lp:launchpad
Diff against target: 41 lines (+4/-4)
3 files modified
lib/lp/bugs/model/tests/test_bugtask.py (+2/-2)
lib/lp/bugs/tests/test_structuralsubscription.py (+1/-1)
lib/lp/codehosting/scanner/tests/test_buglinks.py (+1/-1)
To merge this branch: bzr merge lp:~wgrant/launchpad/testfix
Reviewer Review Type Date Requested Status
William Grant Approve
Review via email: mp+72509@code.launchpad.net

Commit message

Fix test failures from r13754.

Description of the change

I fixed test failures in lp:~wgrant/launchpad/bug-830849, but ended up inadvertently introducing a few more.

To post a comment you must log in.
Revision history for this message
William Grant (wgrant) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'lib/lp/bugs/model/tests/test_bugtask.py'
2--- lib/lp/bugs/model/tests/test_bugtask.py 2011-08-22 09:33:32 +0000
3+++ lib/lp/bugs/model/tests/test_bugtask.py 2011-08-22 23:26:25 +0000
4@@ -2069,9 +2069,9 @@
5
6 def test_new_sourcepackage_is_allowed(self):
7 # A new sourcepackage not on the bug is OK.
8- sp1 = self.factory.makeSourcePackage()
9+ sp1 = self.factory.makeSourcePackage(publish=True)
10 task = self.factory.makeBugTask(target=sp1)
11- sp2 = self.factory.makeSourcePackage()
12+ sp2 = self.factory.makeSourcePackage(publish=True)
13 validate_target(task.bug, sp2)
14
15 def test_multiple_packageless_distribution_tasks_are_forbidden(self):
16
17=== modified file 'lib/lp/bugs/tests/test_structuralsubscription.py'
18--- lib/lp/bugs/tests/test_structuralsubscription.py 2011-05-22 23:43:39 +0000
19+++ lib/lp/bugs/tests/test_structuralsubscription.py 2011-08-22 23:26:25 +0000
20@@ -491,7 +491,7 @@
21 login_person(actor)
22 distroseries = self.factory.makeDistroSeries()
23 sourcepackage = self.factory.makeSourcePackage(
24- distroseries=distroseries)
25+ distroseries=distroseries, publish=True)
26 product = self.factory.makeProduct()
27 bug = self.factory.makeBug(product=product)
28 bug.addTask(actor, sourcepackage)
29
30=== modified file 'lib/lp/codehosting/scanner/tests/test_buglinks.py'
31--- lib/lp/codehosting/scanner/tests/test_buglinks.py 2011-08-12 11:37:08 +0000
32+++ lib/lp/codehosting/scanner/tests/test_buglinks.py 2011-08-22 23:26:25 +0000
33@@ -116,7 +116,7 @@
34 def makeFixtures(self):
35 super(TestBugLinking, self).makeFixtures()
36 self.bug1 = self.factory.makeBug()
37- sp = self.factory.makeSourcePackage()
38+ sp = self.factory.makeSourcePackage(publish=True)
39 self.bug1.addTask(self.bug1.owner, sp)
40 dsp = self.factory.makeDistributionSourcePackage()
41 self.bug1.addTask(self.bug1.owner, dsp)