'Check that we can handle captive portals via the verify CB.
Captive portals do not cause an exception but return bad data.'

def testVerifyCB(self):

    def verify_cb(http_object):
        return (http_object.data == 'Good')
    instrumentor = RequestsInstrumentor()
    instrumentor.responses = [_make_404(), _make_200('Bad'), _make_200('Good')]
    with instrumentor.instrument():
        manager = MockHTTPManager()
        result = manager.OpenURL('http://www.google.com/', verify_cb=verify_cb)
    self.assertEqual(result.data, 'Good')
