launchpad-reviewers team mailing list archive
-
launchpad-reviewers team
-
Mailing list archive
-
Message #29716
[Merge] ~cjwatson/launchpad:test-oops-formatter-cleanup into launchpad:master
Colin Watson has proposed merging ~cjwatson/launchpad:test-oops-formatter-cleanup into launchpad:master.
Commit message:
Make TestOOPSFormatter clean up properly
Requested reviews:
Launchpad code reviewers (launchpad-reviewers)
For more details, see:
https://code.launchpad.net/~cjwatson/launchpad/+git/launchpad/+merge/438029
Otherwise `test_doesnt_linkify_for_non_developers` fails if run after `test_linkifies_for_developers`.
--
Your team Launchpad code reviewers is requested to review the proposed merge of ~cjwatson/launchpad:test-oops-formatter-cleanup into launchpad:master.
diff --git a/lib/lp/app/browser/tests/test_stringformatter.py b/lib/lp/app/browser/tests/test_stringformatter.py
index c99cdbe..d8f556e 100644
--- a/lib/lp/app/browser/tests/test_stringformatter.py
+++ b/lib/lp/app/browser/tests/test_stringformatter.py
@@ -790,6 +790,7 @@ class TestOOPSFormatter(TestCase):
def _setDeveloper(self, value):
"""Override ILaunchBag.developer for testing purposes."""
launch_bag = getUtility(ILaunchBag)
+ self.addCleanup(launch_bag.setDeveloper, launch_bag.developer)
launch_bag.setDeveloper(value)
def test_doesnt_linkify_for_non_developers(self):