Merge ~pappacena/launchpad:prober-test-fix into launchpad:master

Proposed by Thiago F. Pappacena
Status: Merged
Approved by: Thiago F. Pappacena
Approved revision: c02d12eb2d471345d4f0d4bf405e49bac2b958e9
Merge reported by: Otto Co-Pilot
Merged at revision: not available
Proposed branch: ~pappacena/launchpad:prober-test-fix
Merge into: launchpad:master
Diff against target: 25 lines (+0/-14)
1 file modified
lib/lp/registry/tests/test_distributionmirror_prober.py (+0/-14)
Reviewer Review Type Date Requested Status
Colin Watson (community) Approve
Review via email: mp+380730@code.launchpad.net

Commit message

Removing duplicated setup code on mirror prober tests.

To post a comment you must log in.
Revision history for this message
Colin Watson (cjwatson) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/lib/lp/registry/tests/test_distributionmirror_prober.py b/lib/lp/registry/tests/test_distributionmirror_prober.py
2index cb38388..82db551 100644
3--- a/lib/lp/registry/tests/test_distributionmirror_prober.py
4+++ b/lib/lp/registry/tests/test_distributionmirror_prober.py
5@@ -165,20 +165,6 @@ class TestProberHTTPSProtocolAndFactory(TestCase):
6
7 # Change the default policy to accept localhost self-signed
8 # certificates.
9- original_probefactory_policy = ProberFactory.https_agent_policy
10- original_redirect_policy = (
11- RedirectAwareProberFactory.https_agent_policy)
12- ProberFactory.https_agent_policy = LocalhostWhitelistedHTTPSPolicy
13- RedirectAwareProberFactory.https_agent_policy = (
14- LocalhostWhitelistedHTTPSPolicy)
15-
16- def restore_policy():
17- ProberFactory.https_agent_policy = original_probefactory_policy
18- RedirectAwareProberFactory.https_agent_policy = (
19- original_redirect_policy)
20-
21- self.addCleanup(restore_policy)
22-
23 for factory in (ProberFactory, RedirectAwareProberFactory):
24 self.useFixture(MockPatchObject(
25 factory, "https_agent_policy",