

def test_middleware_redirects_static_with_custom_urls(self):
    request = self.rf.get('/articles/articles/10-w-t-f/comments/add/')
    response = DummyResponse(404)
    new_response = self.m.process_response(request, response)
    tools.assert_equals(301, new_response.status_code)
    tools.assert_equals('/articles/10-w-t-f/comments/add/', new_response['Location'])

dataset/ETHPy150Open ella/ella/test_ella/test_utils/test_middleware.py TestLegacyRedirectMiddleware.test_middleware_redirects_static_with_custom_urls/original