def test_remove_headers(self): request = HttpRequest() wrapper = remove_headers('Vary', 'Accept-Encoding') wrapped_view = wrapper(fake_view) response = wrapped_view(request) self.assertEqual(len(response.remove_headers), 2)