~jimbaker/pyjuju/debug-relation-hook-context

« back to all changes in this revision

Viewing changes to juju/providers/ec2/tests/test_utils.py

  • Committer: William Reade
  • Author(s): William Reade
  • Date: 2012-04-11 13:18:42 UTC
  • mfrom: (520.1.3 old-twisted-test-fix)
  • Revision ID: fwereade@gmail.com-20120411131842-2fz6yq5jwwg5ikx8
Tests were not expecting to run against pre-VerifyingContextFactory twisted

R=
CC=
https://codereview.appspot.com/5970089

Show diffs side-by-side

added added

removed removed

Lines of Context:
116
116
        """
117
117
 
118
118
        def match_context(value):
119
 
            if isinstance(value, VerifyingContextFactory):
120
 
                return True
121
 
            return False
 
119
            if VerifyingContextFactory is None:
 
120
                # We're running against an older twisted version without
 
121
                # certificate verification.
 
122
                return value is None
 
123
            return isinstance(value, VerifyingContextFactory)
122
124
 
123
125
        page = self.mocker.replace("twisted.web.client.getPage")
124
126
        page(IMAGE_URI_TEMPLATE % "lucid",