← Back to team overview

launchpad-reviewers team mailing list archive

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

 

Thiago F. Pappacena has proposed merging ~pappacena/launchpad:prober-test-fix into launchpad:master.

Commit message:
Removing duplicated setup code on mirror prober tests.

Requested reviews:
  Launchpad code reviewers (launchpad-reviewers)

For more details, see:
https://code.launchpad.net/~pappacena/launchpad/+git/launchpad/+merge/380730
-- 
Your team Launchpad code reviewers is requested to review the proposed merge of ~pappacena/launchpad:prober-test-fix into launchpad:master.
diff --git a/lib/lp/registry/tests/test_distributionmirror_prober.py b/lib/lp/registry/tests/test_distributionmirror_prober.py
index cb38388..82db551 100644
--- a/lib/lp/registry/tests/test_distributionmirror_prober.py
+++ b/lib/lp/registry/tests/test_distributionmirror_prober.py
@@ -165,20 +165,6 @@ class TestProberHTTPSProtocolAndFactory(TestCase):
 
         # Change the default policy to accept localhost self-signed
         # certificates.
-        original_probefactory_policy = ProberFactory.https_agent_policy
-        original_redirect_policy = (
-            RedirectAwareProberFactory.https_agent_policy)
-        ProberFactory.https_agent_policy = LocalhostWhitelistedHTTPSPolicy
-        RedirectAwareProberFactory.https_agent_policy = (
-            LocalhostWhitelistedHTTPSPolicy)
-
-        def restore_policy():
-            ProberFactory.https_agent_policy = original_probefactory_policy
-            RedirectAwareProberFactory.https_agent_policy = (
-                original_redirect_policy)
-
-        self.addCleanup(restore_policy)
-
         for factory in (ProberFactory, RedirectAwareProberFactory):
             self.useFixture(MockPatchObject(
                 factory, "https_agent_policy",