class SSLMiddlewareTestCase(ValidatorTestCase): """Tests for class SSLMiddleware """ def setUp(self): """Create a SSLMiddleware instance """ super(SSLMiddlewareTestCase, self).setUp() self.item = SSLMiddleware(None) def test_process_request(self): """Tests for method process_request """ self.item.external = mock.MagicMock() input = webob.Request.blank('/test', headers={}) expected = None self.item.external.return_value = None observed = self.item.process_request(input) self.assertEqual(expected, observed) def tearDown(self): """Cleanup the SSLMiddleware instance """ super(SSLMiddlewareTestCase, self).tearDown() self.m.UnsetStubs() self.m.ResetAll()
def setUp(self): """Create a SSLMiddleware instance """ super(SSLMiddlewareTestCase, self).setUp() self.item = SSLMiddleware(None)